Re: [RFC/PATCH] branch: name detached HEAD analogous to status
- From
Marc Branchaud <marcnarc@xiplink.com>
- Date
- Feb 23, 2015, 15:12 UTC
- Message-ID
- <54EB436E.9060106@xiplink.com>
- In-Reply-To
- <71fc137d8015f6e81ab91cfcbcad4ec0fa0dc3e6.1424626271.git.git@drmicha.warpmail.net>
On 15-02-22 12:38 PM, Michael J Gruber wrote:
Show 6 quoted lines
> "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.