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

Re: [PATCH 2/2] merge-recursive: i18n submodule merge output and respect verbosity

From
Elijah Newren <newren@gmail.com>
Date
May 15, 2018, 01:25 UTC
Message-ID
<CABPp-BFw0g=3i8AoiCDgZR82ScOmiozDQqTggZ4U5kmiurFMdg@mail.gmail.com>
In-Reply-To
<20180510211917.138518-3-sbeller@google.com>
I know I said the patches looked okay earlier, but I just noticed something...
On Thu, May 10, 2018 at 2:19 PM, Stefan Beller <sbeller@google.com> wrote:
Show 5 quoted lines
>         case 1:
> -               MERGE_WARNING(path, "not fast-forward");
> -               fprintf(stderr, "Found a possible merge resolution "
> -                               "for the submodule:\n");
> +               output(o, 1, _("Failed to merge submodule %s (not fast-forward)"), path);

We allow folks to set GIT_MERGE_VERBOSITY to change how much output they get. A setting of 1 should only show conflicts or major warnings. 2 is the default and adds a few more messages (e.g. "Auto-merging $PATH", "Adding $PATH" for one-sided adds, etc.), higher levels show even more.

Anyway this output message is correct to use level 1 since this is a conflict, but...

> +               output(o, 1, _("Found a possible merge resolution for the submodule:\n"));
I think this should use level 2.
Show 10 quoted lines
>                 print_commit((struct commit *) merges.objects[0].item);
> -               fprintf(stderr,
> +               output(o, 1, _(
>                        "If this is correct simply add it to the index "
>                        "for example\n"
>                        "by using:\n\n"
>                        "  git update-index --cacheinfo 160000 %s \"%s\"\n\n"
>-                       "which will accept this suggestion.\n",
>+                       "which will accept this suggestion.\n"),
>                        oid_to_hex(&merges.objects[0].item->oid), path);

and so should this one (in fact, I'm tempted to say these last two should use level 3, but since it looks like a command users may have difficulty finding on their own, I'm okay with going with 2).

Previous: Stefan BellerNext: Elijah Newren
Message 8 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.