From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] t6300: avoid creating refs/heads/HEAD
Date: Mon, 27 Feb 2017 16:46:40 -0500 [thread overview]
Message-ID: <20170227214640.h2qi5znay76szm35@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqefyjnwat.fsf@gitster.mtv.corp.google.com>
On Mon, Feb 27, 2017 at 01:44:26PM -0800, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> > ... I suspect that calling interpret_empty_at() from
> > that function is fundamentally flawed. The "@" end user types never
> > means refs/heads/HEAD, and HEAD@{either reflog or -1} would not mean
> > anything that should be taken as a branch_name, either.
>
> The latter should read "HEAD@{either reflog or -1 or 'upstream'}"
>
> Or do we make HEAD@{upstream} to mean "deref HEAD to learn the
> current branch name and then take its upstream"? If so @@{upstream}
> might logically make sense, but I do not see why @{upstream} without
> HEAD or @ is not sufficient to begin with, so...
Yes, HEAD@{upstream} and @@{upstream} are both resolved to the actual
branch name. I also was puzzled whether there was any real use over just
@{upstream}. But it does work, and if you had a script which looked for,
say, $branch@{upstream}, you'd probably want branch=HEAD to keep
working.
The "branch=@" case I am less sympathetic to, as it was mainly supposed
to be a command-line convenience. But it _does_ work now.
-Peff
prev parent reply other threads:[~2017-02-27 23:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 9:29 [PATCH] t6300: avoid creating refs/heads/HEAD Jeff King
2017-02-27 19:33 ` Junio C Hamano
2017-02-27 20:51 ` Jeff King
2017-02-27 21:19 ` Junio C Hamano
2017-02-27 21:41 ` Jeff King
2017-02-27 22:18 ` Junio C Hamano
2017-02-27 21:44 ` Junio C Hamano
2017-02-27 21:46 ` Jeff King [this message]
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=20170227214640.h2qi5znay76szm35@sigill.intra.peff.net \
--to=peff@peff.net \
--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.
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).