All of lore.kernel.org
 help / color / mirror / Atom feed
From: Duy Nguyen <pclouds@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: What's cooking in git.git (May 2013, #04; Wed, 15)
Date: Mon, 27 May 2013 17:36:46 +0700	[thread overview]
Message-ID: <CACsJy8Ct-ei7qbAW4qviQ6=q93ygxDcxRs9F3iHHV4-4Qz6qUA@mail.gmail.com> (raw)
In-Reply-To: <7vk3mtwrq9.fsf@alter.siamese.dyndns.org>

On Mon, May 20, 2013 at 11:17 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Think why the user has such a hard to type ref in the first place.
> The user may have done this previously, thinking that he is detaching
> the HEAD to fix an earlier mistake in a branch:
>
>     $ BAD_COMMIT=$(git rev-parse nd/magic~8)
>     $ git checkout $BAD_COMMIT
>
> but by mistake gave a "-b" after "checkout", i.e.
>
>     $ git checkout -b $BAD_COMMIT
>
> After this, commands that want to work on branch name would still
> work as "expected", with the expectation being the user would be
> working on the refs/heads/$BAD_COMMIT branch, e.g.
>
>     $ git checkout $BAD_COMMIT
>     $ git branch -m $BAD_COMMIT nd/magic-fix
>
> but commands that want to work on commit object name will resolve it
> to the $BAD_COMMIT object (i.e. nd/magic~8), e.g.
>
>     $ git log $BAD_COMMIT
>
> and needs disambiguation if the user wants to work on the commit at
> the tip of the branch, e.g.
>
>     $ git log heads/$BAD_COMMIT
>
> So we really do want the users to notice and take corrective action,
> and one way to attract the attention of the users is to phrase the
> message more explicitly to let them know what is going on.

Point taken. I guess the message would be something like this?

Refname '%.*s' is ignored. It may be created by mistake.

Or should we be more elaborate?
--
Duy

  parent reply	other threads:[~2013-05-27 10:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15 23:42 What's cooking in git.git (May 2013, #04; Wed, 15) Junio C Hamano
2013-05-16  0:25 ` David Aguilar
2013-05-20 10:18 ` Duy Nguyen
2013-05-20 16:17   ` Junio C Hamano
2013-05-21  7:13     ` Thomas Rast
2013-05-21 15:27       ` Junio C Hamano
2013-05-27 10:36     ` Duy Nguyen [this message]
2013-05-28 21:25       ` Junio C Hamano
2013-05-20 23:08 ` Felipe Contreras

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='CACsJy8Ct-ei7qbAW4qviQ6=q93ygxDcxRs9F3iHHV4-4Qz6qUA@mail.gmail.com' \
    --to=pclouds@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.