diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-10-27 22:09:50 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-10-27 22:09:51 (GMT) |
commit | f3cfeb3078ce4af0ac764515795f7e0849a88931 (patch) | |
tree | 2c50c6975c647cfe709b5051a14145a93ae9726d /git-add--interactive.perl | |
parent | 40696c67274305d6258539de5a36649cf833f712 (diff) | |
parent | 35166b1fb54d6c3ca0d9150fd766598a2d3d17b2 (diff) | |
download | git-f3cfeb3078ce4af0ac764515795f7e0849a88931.zip git-f3cfeb3078ce4af0ac764515795f7e0849a88931.tar.gz git-f3cfeb3078ce4af0ac764515795f7e0849a88931.tar.bz2 |
Merge branch 'dl/checkout-p-merge-base'
"git checkout -p A...B [-- <path>]" did not work, even though the
same command without "-p" correctly used the merge-base between
commits A and B.
* dl/checkout-p-merge-base:
t2016: add a NEEDSWORK about the PERL prerequisite
add-patch: add NEEDSWORK about comparing commits
Doc: document "A...B" form for <tree-ish> in checkout and switch
builtin/checkout: fix `git checkout -p HEAD...` bug
Diffstat (limited to 'git-add--interactive.perl')
-rwxr-xr-x | git-add--interactive.perl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/git-add--interactive.perl b/git-add--interactive.perl index 8a72018..e713fe3 100755 --- a/git-add--interactive.perl +++ b/git-add--interactive.perl @@ -1830,6 +1830,13 @@ sub process_args { $arg = shift @ARGV or die __("missing --"); if ($arg ne '--') { $patch_mode_revision = $arg; + + # NEEDSWORK: Instead of comparing to the literal "HEAD", + # compare the commit objects instead so that other ways of + # saying the same thing (such as "@") are also handled + # appropriately. + # + # This applies to the cases below too. $patch_mode = ($arg eq 'HEAD' ? 'reset_head' : 'reset_nothead'); $arg = shift @ARGV or die __("missing --"); |