summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0b5ea16)
raw | patch | inline | side by side (parent: 0b5ea16)
author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 12 Mar 2007 17:03:47 +0000 (13:03 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 12 Mar 2007 17:03:47 +0000 (13:03 -0400) |
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 <spearce@spearce.org>
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 <spearce@spearce.org>
git-gui.sh | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index 1981827a8e8bcc2b2e43598bb06e3e6c87bd4d1d..0e448007f7c3cd4a109dd5920bc9d1fc6a21b483 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
}
}
}
- 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.