Re: [PATCH 1/1] Inform about fast-forwarding of submodules during merge
- From
Stefan Beller <sbeller@google.com>
- Date
- May 15, 2018, 00:41 UTC
- Message-ID
- <CAGZ79kaKzahJ2oJ7qwerCS6m1c0MBiYiysf+HOU=3uRwfPqOkg@mail.gmail.com>
- In-Reply-To
- <20180514205737.21313-2-leif.middelschulte@gmail.com>
On Mon, May 14, 2018 at 1:57 PM, Leif Middelschulte <leif.middelschulte@gmail.com> wrote:
Show 7 quoted lines
> From: Leif Middelschulte <Leif.Middelschulte@gmail.com>
>
> Inform the user about an automatically fast-forwarded submodule. The silent merge
> behavior was introduced by commit 68d03e4a6e44 ("Implement automatic fast-forward
> merge for submodules", 2010-07-07)).
>
> Signed-off-by: Leif Middelschulte <Leif.Middelschulte@gmail.com>Thanks for following up with a patch. This looks good to me!
Thanks, Stefan
Show 26 quoted lines
> ---
> merge-recursive.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/merge-recursive.c b/merge-recursive.c
> index a4b91d17f..4a03044d1 100644
> --- a/merge-recursive.c
> +++ b/merge-recursive.c
> @@ -1093,10 +1093,14 @@ static int merge_submodule(struct merge_options *o,
> /* Case #1: a is contained in b or vice versa */
> if (in_merge_bases(commit_a, commit_b)) {
> oidcpy(result, b);
> + output(o, 1, _("Note: Fast-forwarding submodule %s to the following commit"), path);
> + output_commit_title(o, commit_b);
> return 1;
> }
> if (in_merge_bases(commit_b, commit_a)) {
> oidcpy(result, a);
> + output(o, 1, _("Note: Fast-forwarding submodule %s to the following commit:"), path);
> + output_commit_title(o, commit_a);
> return 1;
> }
>
> --
> 2.15.1 (Apple Git-101)
>