git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Ralf Thielow <ralf.thielow@gmail.com>, Git List <git@vger.kernel.org>
Subject: Re: [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages
Date: Fri, 08 May 2015 10:20:14 -0700	[thread overview]
Message-ID: <xmqqbnhvm1f5.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAPig+cSeNn0r7N6vp+qs4NTNwfYx5p-zUX3tkifuXLu+nB2yNQ@mail.gmail.com> (Eric Sunshine's message of "Fri, 8 May 2015 13:10:57 -0400")

Eric Sunshine <sunshine@sunshineco.com> writes:

> On Fri, May 8, 2015 at 12:53 PM, Ralf Thielow <ralf.thielow@gmail.com> wrote:
>> sequencer.c: abbreviate hashs placed in the middle of messages
>
> s/hashs/hashes/
> ...
>> + return error(_("Commit %s... is a merge but no -m option was
>> given."),
>> +                               find_unique_abbrev(commit->object.sha1, DEFAULT_ABBREV));
>
> Are short SHA1's followed by "..." anywhere else in the project? It
> seems strange to introduce such usage here.

There are (and used to be the norm), as in "git diff --raw", for
example.

But I doubt the value of pointing out exact commit in the first
place, which leads me to say that "no -m option was given but
history has a merge" might be a viable alternative.

If identifying the exact commit has value, on the other hand, we can
rephrase it like this:

	error(_("no -m option was given to pick a merge '%s'", ...));

to place it not in the middle.  We can do similar rephrasing for
other messages as well.

>> -                       return error(_("Commit %s does not have parent %d"),
>> -                               sha1_to_hex(commit->object.sha1), opts->mainline);

	error(_("No parent %d for commit '%s'", opts->mainline, ...);

>> -               return error(_("Mainline was specified but commit %s is not a merge."),
>> -                       sha1_to_hex(commit->object.sha1));

	error(_("-m option was given for non-merge commit '%s'", ...);

  parent reply	other threads:[~2015-05-08 17:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08 16:53 [PATCH] sequencer.c: abbreviate hashs placed in the middle of messages Ralf Thielow
2015-05-08 17:10 ` Eric Sunshine
2015-05-08 17:20   ` Ralf Thielow
2015-05-08 17:20   ` Junio C Hamano [this message]
2015-05-08 17:26     ` Ralf Thielow
2015-05-08 17:31       ` Junio C Hamano
2015-05-08 17:58     ` Ralf Thielow
2015-05-08 18:42       ` Junio C Hamano
2015-05-08 19:56         ` Ralf Thielow
2015-05-08 20:24           ` Junio C Hamano
2015-05-08 20:57             ` Ralf Thielow
2015-05-10  9:05             ` Matthieu Moy
2015-05-10 19:17               ` Junio C Hamano
2015-05-10 19:36                 ` Matthieu Moy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqbnhvm1f5.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=ralf.thielow@gmail.com \
    --cc=sunshine@sunshineco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).