git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/1] Inform about fast-forwarding of submodules during merge

From
Elijah Newren <newren@gmail.com>
Date
May 15, 2018, 01:17 UTC
Message-ID
<CABPp-BGp_zP8Z2S8FskiNvhNeQH3f=HdnQ39vX6xQz=oSyVfMQ@mail.gmail.com>
In-Reply-To
<20180514205737.21313-2-leif.middelschulte@gmail.com>
Hi Leif,

On Mon, May 14, 2018 at 1:57 PM, Leif Middelschulte <leif.middelschulte@gmail.com> wrote:

Thanks for updating the patch on top of Stefan's series.  :-)
Show 5 quoted lines
>         /* 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);

Level 1 is for conflicts; I don't think this message should have higher priority than "Auto-merging $PATH" for normal files, so it needs to be 2 (or maybe 3, see below) rather than 1. (The default output level is 2, so it'd still be shown, but we do allow people to remove informational message and just get conflicts by setting GIT_MERGE_VERBOSITY to 1, or request extra information by setting it higher)

Also, this two-line message seems somewhat verbose compared to the other messages in merge_submdoule(), and when compared to the simple "Auto-merging $PATH" we do for normal files. The multi-line nature of it particularly strikes me; the merge-recursive code has generally avoided multi-line messages even for conflicts.

In comparison, your original patch just had ("Fast-forwarding submodule %s", path).

Maybe you could "if (show(o, 3)) { output your current message } else { output the simpler message }" ? Or is this verbosity warranted for submodules at the default print level?

I'm not a heavy user of submodules, so I may need to get others to weigh in on the verbosity and multi-line aspects, but I wanted to at least flag this as somewhat surprising to me.

Elijah
Previous: Stefan BellerNext: Junio C Hamano
Message 14 of 15 in “warn about auto fast-forwarded submodules during merges”
  1. 0/1 warn about auto fast-forwarded submodules during mergesLeif Middelschulte, May 10, 2018
  2. 1/1 Warn about fast-forwarding of submodules during mergeLeif Middelschulte, May 10, 2018
  3. Stefan BellerMay 10, 2018
  4. Leif MiddelschulteMay 10, 2018
  5. 0/2 Submodule merging: i18n, verbosityStefan Beller, May 10, 2018
  6. 1/2 submodule.c: move submodule merging to merge-recursive.cStefan Beller, May 10, 2018
  7. 2/2 merge-recursive: i18n submodule merge output and respect verbosityStefan Beller, May 10, 2018
  8. Elijah NewrenMay 15, 2018
  9. Elijah NewrenMay 11, 2018
  10. Stefan BellerMay 11, 2018
  11. 0/1 rebased: inform about auto submodule ff during mergeLeif Middelschulte, May 14, 2018
  12. 1/1 Inform about fast-forwarding of submodules during mergeLeif Middelschulte, May 14, 2018
  13. Stefan BellerMay 15, 2018
  14. Elijah NewrenMay 15, 2018
  15. Junio C HamanoMay 15, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.