git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Marc Branchaud <marcnarc@xiplink.com>
To: Michael J Gruber <git@drmicha.warpmail.net>, git@vger.kernel.org
Subject: Re: [RFC/PATCH] branch: name detached HEAD analogous to status
Date: Mon, 23 Feb 2015 10:12:46 -0500	[thread overview]
Message-ID: <54EB436E.9060106@xiplink.com> (raw)
In-Reply-To: <71fc137d8015f6e81ab91cfcbcad4ec0fa0dc3e6.1424626271.git.git@drmicha.warpmail.net>

On 15-02-22 12:38 PM, Michael J Gruber wrote:
> "git status" carefully names a detached HEAD "at" resp. "from" a rev or
> ref depending on whether the detached HEAD has moved since. "git branch"
> always uses "from", which can be confusing, because a status-aware user
> would interpret this as moved detached HEAD.
> 
> Make "git branch" use the same logic and wording.

Except that the wording in "git branch" is more correct, especially if the
detached HEAD contains new commits.

In other words, "at" is only correct if the detached HEAD matches the ref.
If the HEAD has other commits, it is no longer "at" that ref but instead it
has grown "from" it.

But even if the detached HEAD matches the ref, saying it came "from" that ref
(with 0 extra commits) is still better than saying
detached-HEAD-with-extra-commits is "at" the ref.

		M.

  parent reply	other threads:[~2015-02-23 15:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-22 17:38 [RFC/PATCH] branch: name detached HEAD analogous to status Michael J Gruber
2015-02-22 19:21 ` Junio C Hamano
2015-02-23  8:50   ` Michael J Gruber
2015-02-23 15:21   ` Marc Branchaud
2015-03-06 15:04     ` [PATCHv2 0/2] branch output for detached HEAD Michael J Gruber
2015-03-06 15:04       ` [PATCHv2 1/2] wt-status: refactor detached HEAD analysis Michael J Gruber
2015-03-06 15:04       ` [PATCHv2 2/2] branch: name detached HEAD analogous to status Michael J Gruber
2015-03-06 20:23         ` Junio C Hamano
2015-02-23 15:12 ` Marc Branchaud [this message]
2015-02-23 16:24   ` [RFC/PATCH] " Michael J Gruber
2015-02-23 17:23     ` Marc Branchaud

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=54EB436E.9060106@xiplink.com \
    --to=marcnarc@xiplink.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).