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
This commit is contained in:
@ -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 --");
|
||||
|
||||
Reference in New Issue
Block a user