mirror of
https://github.com/git/git.git
synced 2024-11-24 10:26:17 +08:00
Merge branch 'xy/format-patch-prereq-patch-id-fix'
Recently added "--base" option to "git format-patch" command did not correctly generate prereq patch ids. * xy/format-patch-prereq-patch-id-fix: format-patch: clear UNINTERESTING flag before prepare_bases
This commit is contained in:
commit
2516b4711f
@ -1756,6 +1756,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
||||
if (base_commit || base_auto) {
|
||||
struct commit *base = get_base_commit(base_commit, list, nr);
|
||||
reset_revision_walk();
|
||||
clear_object_flags(UNINTERESTING);
|
||||
prepare_bases(&bases, base, list, nr);
|
||||
}
|
||||
|
||||
|
@ -1554,13 +1554,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' '
|
||||
|
Loading…
Reference in New Issue
Block a user