All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Ralf Thielow <ralf.thielow@gmail.com>
Cc: Eric Sunshine <sunshine@sunshineco.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 11:42:43 -0700	[thread overview]
Message-ID: <xmqqtwvmlxlo.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAN0XMOKPbKUMwU5-T78m_knt=9O2GkKaqmXKViSi5k-Z7Damrg@mail.gmail.com> (Ralf Thielow's message of "Fri, 8 May 2015 19:58:39 +0200")

Ralf Thielow <ralf.thielow@gmail.com> writes:

> Junio C Hamano <gitster@pobox.com> wrote:
>> 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:
>
> It has value since you see the hash and can check if you have
> passed a wrong commit accidently.

Let's say by mistake I applied your patch while I had 'master'
checked out, and I want to cherry-pick it to its own branch, by
doing something like

    $ git checkout -b rt/sequencer-error-messages maint
    $ git cherry-pick <branch-name-here>

and typed next by mistake instead of master in the above.  I should
get "that commit is a merge but you didn't tell me relative to which
of its parents you want the changes ported".

Does it make it any clearer to say "commit 38e707... is a merge"
compared to "commit you gave me is a merge", with or without
abbreviation?

I do not think so.  I know I said "git cherry-pick next".

> I don't see why you suggest to rephrase the messages over an
> abbreviation of the hash. Is it because I wrote "in the middle of"?

No.

I am merely making sure that the original problem is well analysed
and we looked at other possibilities before picking one, i.e. making
sure that we did not pick the one merely because it happened to be
an expedient thing to do.

And shortening the output feels to me a more expedient thing to do
because we do not have to analyse the ramification of possible
information loss (your "It has value since...").  If we analyse the
issue well, we might realize that there is little point in showing
the commit object name in hexadecimal, be it in full or in shortened
form.

If the proposal were to parrot what the user typed on the command
line, e.g. one of these (or their rephrased versions)

	error: commit 'next' is a merge but no -m option was given.
	error: no -m option was given to pick a merge 'next'.

against the above example, then I would say that would be an
improvement, but that is not what is being discussed, so...

  reply	other threads:[~2015-05-08 18:42 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
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 [this message]
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=xmqqtwvmlxlo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.