Fossil SCM

When case-sensitive is off, refuse a commit that includes a pathname that differs only in case from another pathname, since both names are one file on disk and the commit would record its content under both.

danshearer 2026-11-16 12:09 UTC unicode-fixes
Commit 30ed2b9377c851c17427c82e0d65ab5f9d443e4e0f959007c41355e0a6351723
1 file changed +11
--- src/checkin.c
+++ src/checkin.c
@@ -2868,10 +2868,21 @@
28682868
fossil_fatal("cannot do a partial commit of '%s' without '%s' because "
28692869
"'%s' was renamed to '%s'", zFrom, zTo, zFrom, zTo);
28702870
}
28712871
db_finalize(&q);
28722872
}
2873
+
2874
+ /* With case-sensitive set to off, two filenames that differ
2875
+ ** only in case are the same file on disk. Committing either
2876
+ ** file would record the content content under both filenames.
2877
+ */
2878
+ vfile_check_case_collisions(
2879
+ "SELECT pathname FROM vfile WHERE vid=%d AND NOT deleted"
2880
+ " AND pathname %s IN (SELECT pathname FROM vfile"
2881
+ " WHERE vid=%d AND NOT deleted"
2882
+ " AND is_selected(id))",
2883
+ vid, filename_collation(), vid);
28732884
28742885
db_begin_transaction();
28752886
db_record_repository_filename(0);
28762887
if( hasChanges==0 && !isAMerge && !allowEmpty && !forceFlag ){
28772888
fossil_fatal("nothing has changed; use --allow-empty to override");
28782889
--- src/checkin.c
+++ src/checkin.c
@@ -2868,10 +2868,21 @@
2868 fossil_fatal("cannot do a partial commit of '%s' without '%s' because "
2869 "'%s' was renamed to '%s'", zFrom, zTo, zFrom, zTo);
2870 }
2871 db_finalize(&q);
2872 }
 
 
 
 
 
 
 
 
 
 
 
2873
2874 db_begin_transaction();
2875 db_record_repository_filename(0);
2876 if( hasChanges==0 && !isAMerge && !allowEmpty && !forceFlag ){
2877 fossil_fatal("nothing has changed; use --allow-empty to override");
2878
--- src/checkin.c
+++ src/checkin.c
@@ -2868,10 +2868,21 @@
2868 fossil_fatal("cannot do a partial commit of '%s' without '%s' because "
2869 "'%s' was renamed to '%s'", zFrom, zTo, zFrom, zTo);
2870 }
2871 db_finalize(&q);
2872 }
2873
2874 /* With case-sensitive set to off, two filenames that differ
2875 ** only in case are the same file on disk. Committing either
2876 ** file would record the content content under both filenames.
2877 */
2878 vfile_check_case_collisions(
2879 "SELECT pathname FROM vfile WHERE vid=%d AND NOT deleted"
2880 " AND pathname %s IN (SELECT pathname FROM vfile"
2881 " WHERE vid=%d AND NOT deleted"
2882 " AND is_selected(id))",
2883 vid, filename_collation(), vid);
2884
2885 db_begin_transaction();
2886 db_record_repository_filename(0);
2887 if( hasChanges==0 && !isAMerge && !allowEmpty && !forceFlag ){
2888 fossil_fatal("nothing has changed; use --allow-empty to override");
2889

Keyboard Shortcuts

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