Fossil SCM

Make the "fossil extra" command insensitive to case on case-insensitive filesystems. Ticket [101ab6946f1c7]

drh 2011-12-29 19:42 trunk
Commit 42de7459321baeeaa075d83698b794fbdce96421
1 file changed +3 -1
+3 -1
--- src/checkin.c
+++ src/checkin.c
@@ -288,11 +288,12 @@
288288
Blob rewrittenPathname;
289289
const char *zPathname, *zDisplayName;
290290
291291
db_must_be_within_tree();
292292
cwdRelative = determine_cwd_relative_option();
293
- db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
293
+ db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
294
+ filename_collation());
294295
n = strlen(g.zLocalRoot);
295296
blob_init(&path, g.zLocalRoot, n-1);
296297
if( zIgnoreFlag==0 ){
297298
zIgnoreFlag = db_get("ignore-glob", 0);
298299
}
@@ -306,10 +307,11 @@
306307
fossil_all_reserved_names()
307308
);
308309
if( file_tree_name(g.zRepositoryName, &repo, 0) ){
309310
db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo);
310311
}
312
+ db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)");
311313
blob_zero(&rewrittenPathname);
312314
while( db_step(&q)==SQLITE_ROW ){
313315
zDisplayName = zPathname = db_column_text(&q, 0);
314316
if( cwdRelative ) {
315317
char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
316318
--- src/checkin.c
+++ src/checkin.c
@@ -288,11 +288,12 @@
288 Blob rewrittenPathname;
289 const char *zPathname, *zDisplayName;
290
291 db_must_be_within_tree();
292 cwdRelative = determine_cwd_relative_option();
293 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY)");
 
294 n = strlen(g.zLocalRoot);
295 blob_init(&path, g.zLocalRoot, n-1);
296 if( zIgnoreFlag==0 ){
297 zIgnoreFlag = db_get("ignore-glob", 0);
298 }
@@ -306,10 +307,11 @@
306 fossil_all_reserved_names()
307 );
308 if( file_tree_name(g.zRepositoryName, &repo, 0) ){
309 db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo);
310 }
 
311 blob_zero(&rewrittenPathname);
312 while( db_step(&q)==SQLITE_ROW ){
313 zDisplayName = zPathname = db_column_text(&q, 0);
314 if( cwdRelative ) {
315 char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
316
--- src/checkin.c
+++ src/checkin.c
@@ -288,11 +288,12 @@
288 Blob rewrittenPathname;
289 const char *zPathname, *zDisplayName;
290
291 db_must_be_within_tree();
292 cwdRelative = determine_cwd_relative_option();
293 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
294 filename_collation());
295 n = strlen(g.zLocalRoot);
296 blob_init(&path, g.zLocalRoot, n-1);
297 if( zIgnoreFlag==0 ){
298 zIgnoreFlag = db_get("ignore-glob", 0);
299 }
@@ -306,10 +307,11 @@
307 fossil_all_reserved_names()
308 );
309 if( file_tree_name(g.zRepositoryName, &repo, 0) ){
310 db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo);
311 }
312 db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)");
313 blob_zero(&rewrittenPathname);
314 while( db_step(&q)==SQLITE_ROW ){
315 zDisplayName = zPathname = db_column_text(&q, 0);
316 if( cwdRelative ) {
317 char *zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
318

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button