@matheusbsbs / matheus-bagliano / commits / 14efcc7485
Fork 0

git-gui: Correct unmerged file detection at commit time.

Its impossible to commit an index which has unmerged stages. Unfortunately a bug in git-gui allowed the user to try to do exactly that, as we broke out of our file scanning loop as soon as we found a valid AMD index state. That's wrong, as the files are coming back from our array in pseudo-random order; an unmerged file may get returned only after all merged files. I also noticed the grammer around here in our dialog boxes still used the term 'include', so this has been updated to reflect current usage. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Jan 21, 2007 at 13:34 UTC 14efcc748597f8b00d362df26adf5c4b4b7777f7
1 file changed +4 -4
git-gui.sh
+4 -4
@@ -896,12 +896,12 @@ The rescan will be automatically started now.
896 _? {continue}
897 A? -
898 D? -
899 - M? {set files_ready 1; break}
899 + M? {set files_ready 1}
900 U? {
901 error_popup "Unmerged files cannot be committed.
902
903 File [short_path $path] has merge conflicts.
904 -You must resolve them and include the file before committing.
904 +You must resolve them and add the file before committing.
905 "
906 unlock_index
907 return
@@ -915,9 +915,9 @@ File [short_path $path] cannot be committed by this program.
915 }
916 }
917 if {!$files_ready} {
918 - error_popup {No included files to commit.
918 + error_popup {No changes to commit.
919
920 -You must include at least 1 file before you can commit.
920 +You must add at least 1 file before you can commit.
921 }
922 unlock_index
923 return