On Fri, Apr 22, 2016 at 02:59:42PM -0700, Junio C Hamano wrote:
>Xiaolong Ye writes:
>
>> +test_expect_success 'format-patch --base' '
>> +git checkout side &&
>> +git format-patch --stdout --base=HEAD~~~ -1 >patch &&
>> +grep -e "^base-commit:" -A3 patch
On Fri, Apr 22, 2016 at 02:39:28PM -0700, Junio C Hamano wrote:
>Xiaolong Ye writes:
>
>> diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
>> index eed2981..a6ce727 100755
>> --- a/t/t4014-format-patch.sh
>> +++ b/t/t4014-format-patch.sh
>> @@ -1460,4 +1460,19
Xiaolong Ye writes:
> +test_expect_success 'format-patch --base' '
> + git checkout side &&
> + git format-patch --stdout --base=HEAD~~~ -1 >patch &&
> + grep -e "^base-commit:" -A3 patch >actual &&
The -A3 is GNUism. To do this portably, perhaps you can do
Xiaolong Ye writes:
> +static struct commit *get_base_commit(const char *base_commit,
> + struct commit **list,
> + int total)
> +{
> + struct commit *base = NULL;
> + struct commit **rev;
> +
Xiaolong Ye writes:
> diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
> index eed2981..a6ce727 100755
> --- a/t/t4014-format-patch.sh
> +++ b/t/t4014-format-patch.sh
> @@ -1460,4 +1460,19 @@ test_expect_success 'format-patch -o overrides
>
Maintainers or third party testers may want to know the exact base tree
the patch series applies to. Teach git format-patch a '--base' option
to record the base tree info and append it at the end of the first
message (either the cover letter or the first patch in the series).
The base tree info
6 matches
Mail list logo