Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: Harald Nordgren via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org,  Harald Nordgren <haraldnordgren@gmail.com>
Subject: Re: [PATCH] object-name: accept @{p} as short for @{push}
Date: Wed, 30 Sep 2026 15:07:44 -0700	[thread overview]
Message-ID: <xmqqbj9e8kb3.fsf@gitster.g> (raw)
In-Reply-To: <CALnO6CBR0XJUJR=2e5kUM8Fk9aV5uz+QxajRpnFFVTEkFfJQ3Q@mail.gmail.com> (D. Ben Knoble's message of "Wed, 30 Sep 2026 17:39:03 -0400")

"D. Ben Knoble" <ben.knoble@gmail.com> writes:

> On Wed, Sep 30, 2026 at 4:06 PM Harald Nordgren via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
>>
>> From: Harald Nordgren <haraldnordgren@gmail.com>
>>
>> Typing "git log @{p}.." fails with "unknown revision", even though
>> "@{u}" works as the short form of "@{upstream}". Users who reach for
>> the one letter spelling of the push destination by analogy get an
>> error.
>>
>> Accept "@{p}" wherever "@{push}" is accepted, in any case, just like
>> "@{u}".
>
> I've oft wanted this. Though, I don't have a `p = push` (or `p =
> pull`) alias set, because it could be short for either!
>
> There's no "@{pull}", though, so that reasoning doesn't apply here.

Interesting thing to point out.  Letting @{push} squat on @{p} would
prevent us from adding @{pull} and anything that begins with 'p' in
the future (like 'previous', perhaps?).

> I have to wonder if there's an older discussion around these notations
> that explains why one got shorthand and the other didn't?

But we have lived with only two at_marks in the object name syntax,
for upstream and for push, and nothing else for quite some time.
So perhaps it is OK to assume that we do not have to worry about any
new ones in the future?

Digging the history, @{upstream} came in 2010 and @{push} came in
2015.

@{u} existed since the inception of @{upstream}, as we can see in
https://lore.kernel.org/git/20150331173740.GE18912@peff.net/ which
is the first iteration of the patch set that added @{push}.  It is
unclear what was said during the review of v2 [*] but in the review
of v3 https://lore.kernel.org/git/20150521045233.GA26507@peff.net/,
nobody questioned the asymmetry between @{upstream} having a
short-and-sweet @{u} while @{push} lacked the corresponding @{p}.

I do not know if that was because "push" was so short and easy to
type anyway?


[Footnote]

 * https://public-inbox.org/git/?q=gmane:268185 would have given us
   a good way to find what thread Peff was referring to in the cover
   letter of v3 iteration:

   https://lore.kernel.org/git/20150521044429.GA5857@peff.net/

   Unfortunately, we are getting 502 back X-<.

  reply	other threads:[~2026-09-30 22:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 19:39 [PATCH] object-name: accept @{p} as short for @{push} Harald Nordgren via GitGitGadget
2026-09-30 21:39 ` D. Ben Knoble
2026-09-30 22:07   ` Junio C Hamano [this message]
2026-09-30 22:39     ` Jeff King
2026-10-01  3:29     ` Junio C Hamano
2026-09-30 22:52 ` Junio C Hamano
2026-10-01  7:05   ` Harald Nordgren
2026-10-02  7:49 ` [PATCH v2] " Harald Nordgren via GitGitGadget
2026-10-02 12:08   ` Ben Knoble
2026-10-02 13:57     ` Harald Nordgren
2026-10-02 14:47   ` Junio C Hamano

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=xmqqbj9e8kb3.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ben.knoble@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=haraldnordgren@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox