summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9f4119e)
raw | patch | inline | side by side (parent: 9f4119e)
author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 23 Aug 2007 06:44:13 +0000 (02:44 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 23 Aug 2007 06:44:13 +0000 (02:44 -0400) |
git-apply does not accept a patch that was generated as a three-way
combined diff format such as we see during merge conflicts. If we
get such a diff in our diff viewer and try to send it to git-apply
it just errors out and the user is left confused wondering why they
cannot stage that hunk.
Instead of feeding a known to be unacceptable hunk to git-apply we
now just disable the stage/unstage context menu option if the hunk
came from a three way diff. The user may still be confused about
why they cannot work with a combined diff, but at least they are
only confused as to why git-gui is not offering them the action.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
combined diff format such as we see during merge conflicts. If we
get such a diff in our diff viewer and try to send it to git-apply
it just errors out and the user is left confused wondering why they
cannot stage that hunk.
Instead of feeding a known to be unacceptable hunk to git-apply we
now just disable the stage/unstage context menu option if the hunk
came from a three way diff. The user may still be confused about
why they cannot work with a combined diff, but at least they are
only confused as to why git-gui is not offering them the action.
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 559b62be0338b1b39fa73ef0813e436a8e4dc577..743b7d41968c3c68f7e31756208d15e60a5b4cca 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
set current_branch {}
set is_detached 0
set current_diff_path {}
+set is_3way_diff 0
set selected_commit_type new
######################################################################
}
set l "Stage Hunk For Commit"
}
+ if {$::is_3way_diff} {
+ set s disabled
+ }
$ctxm entryconf $::ui_diff_applyhunk -state $s -label $l
tk_popup $ctxm $X $Y
}