From c7bafad10d294cc0b26ab6171efd89dd9b132f70 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Mon, 12 Mar 2007 13:03:47 -0400 Subject: [PATCH] git-gui: Allow committing empty merges Johannes Sixt noticed that git-gui would not let the user commit a merge created by `git merge -s ours` as the ours strategy does not alter the tree (that is HEAD^1^{tree} = HEAD^{tree} after the merge). The same issue arises from amending such a merge commit. We now permit an empty commit (no changed files) if we are doing a merge commit. Core Git does this with its command line based git-commit tool, so it makes sense for the GUI to do the same. Signed-off-by: Shawn O. Pearce --- git-gui.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-gui.sh b/git-gui.sh index 1981827a8..0e448007f 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -1171,7 +1171,7 @@ File [short_path $path] cannot be committed by this program. } } } - if {!$files_ready} { + if {!$files_ready && ![string match *merge $curType]} { info_popup {No changes to commit. You must add at least 1 file before you can commit. -- 2.26.2