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

Re: [PATCH 1/3] builtin/log: downcase the beginning of error messages

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Feb 22, 2019, 20:24 UTC
Message-ID
<CAPig+cRhk-0LBCmUQ4LszJrnmnXCDz7HxWqDnKX53woBYhr-KQ@mail.gmail.com>
In-Reply-To
<20190222201111.98196-2-gitster@pobox.com>
On Fri, Feb 22, 2019 at 3:11 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> diff --git a/builtin/log.c b/builtin/log.c
> @@ -911,7 +911,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
>         if (rev->pending.nr != 2)
> -               die(_("Need exactly one range."));
> +               die(_("need exactly one range."));
Perhaps drop the trailing period while you're here?
> @@ -921,7 +921,7 @@ static void get_patch_ids(struct rev_info *rev, struct patch_ids *ids)
>         if ((flags1 & UNINTERESTING) == (flags2 & UNINTERESTING))
> -               die(_("Not a range."));
> +               die(_("not a range."));
Ditto.
> @@ -1331,16 +1331,16 @@ static struct commit *get_base_commit(const char *base_commit,
>                         if (get_oid(upstream, &oid))
> -                               die(_("Failed to resolve '%s' as a valid ref."), upstream);
> +                               die(_("failed to resolve '%s' as a valid ref."), upstream);
Ditto.
>                         if (!base_list || base_list->next)
> -                               die(_("Could not find exact merge base."));
> +                               die(_("could not find exact merge base."));
Ditto.
> -                       die(_("Failed to get upstream, if you want to record base commit automatically,\n"
> +                       die(_("failed to get upstream, if you want to record base commit automatically,\n"
>                               "please use git branch --set-upstream-to to track a remote branch.\n"
>                               "Or you could specify base commit by --base=<base-commit-id> manually."));

The capitalized "Or you..." is odd after s/Failed/failed/. I wonder if the period in the first sentence should be replaced by a semicolon and then "Or you..." downcased (and the final period dropped):

    die(_("failed to ... automatically,\n"
    "please use ... branch;\n"
    "or you ... manually"));
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 9 in “format-patch --no-clobber”
  1. 0/3 format-patch --no-clobberJunio C Hamano, Feb 22, 2019
  2. 1/3 builtin/log: downcase the beginning of error messagesJunio C Hamano, Feb 22, 2019
  3. Eric SunshineFeb 22, 2019
  4. Junio C HamanoFeb 22, 2019
  5. 2/3 format-patch: notice failure to open cover letter for writingJunio C Hamano, Feb 22, 2019
  6. 3/3 format-patch: --no-clobber refrains from overwriting output filesJunio C Hamano, Feb 22, 2019
  7. Eric SunshineFeb 22, 2019
  8. Jeff KingFeb 23, 2019
  9. Ntentos StavrosMar 12, 2019

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.