summaryrefslogtreecommitdiff
path: root/t/t4014-format-patch.sh
diff options
context:
space:
mode:
authorXiaolong Ye <xiaolong.ye@intel.com>2018-06-04 15:05:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-19 18:36:41 (GMT)
commit15b76c1fb3ab013b99498c9dca333aaa4808927e (patch)
tree3332cfcfc2de566fd86a0ac2890358b5f466054a /t/t4014-format-patch.sh
parenta42a58d7b62cc1d6301440e81a83feed9d7c118c (diff)
downloadgit-15b76c1fb3ab013b99498c9dca333aaa4808927e.zip
git-15b76c1fb3ab013b99498c9dca333aaa4808927e.tar.gz
git-15b76c1fb3ab013b99498c9dca333aaa4808927e.tar.bz2
format-patch: clear UNINTERESTING flag before prepare_bases
When users specify the commit range with 'Z..C' pattern for format-patch, all the parents of Z (including Z) would be marked as UNINTERESTING which would prevent revision walk in prepare_bases from getting the prerequisite commits, thus `git format-patch --base <base_commit_sha> Z..C` won't be able to generate the list of prerequisite patch ids. Clear UNINTERESTING flag with clear_object_flags solves this issue. Reported-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com> Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4014-format-patch.sh')
-rwxr-xr-xt/t4014-format-patch.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 482112c..b67d572 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -1551,13 +1551,15 @@ test_expect_success 'format-patch -o overrides format.outputDirectory' '
test_expect_success 'format-patch --base' '
git checkout side &&
- git format-patch --stdout --base=HEAD~3 -1 | tail -n 7 >actual &&
+ git format-patch --stdout --base=HEAD~3 -1 | tail -n 7 >actual1 &&
+ git format-patch --stdout --base=HEAD~3 HEAD~.. | tail -n 7 >actual2 &&
echo >expected &&
echo "base-commit: $(git rev-parse HEAD~3)" >>expected &&
echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --stable | awk "{print \$1}")" >>expected &&
echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --stable | awk "{print \$1}")" >>expected &&
signature >> expected &&
- test_cmp expected actual
+ test_cmp expected actual1 &&
+ test_cmp expected actual2
'
test_expect_success 'format-patch --base errors out when base commit is in revision list' '