From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: Harald Nordgren <haraldnordgren@gmail.com>,
git@vger.kernel.org, gitgitgadget@gmail.com
Subject: Re: [PATCH] revisions: add @{default} shorthand for default branch
Date: Mon, 02 Feb 2026 14:28:17 -0800 [thread overview]
Message-ID: <xmqqcy2mwzjy.fsf@gitster.g> (raw)
In-Reply-To: <d92bd08f-abee-49a6-89ad-3be5e0c06ad6@gmail.com> (Phillip Wood's message of "Mon, 2 Feb 2026 09:37:10 +0000")
Phillip Wood <phillip.wood123@gmail.com> writes:
> ... Please
> correct me if I'm wrong but I think maybe what you're asking for is a
> shorthand for the branch "$b" where
>
> git push origin $b
>
> would update the remote tracking branch pointed to by "origin/HEAD".
> I've not really thought this through but if that is what you want maybe
> we could add "@{local}" to give that branch. Then, with the default
> refspecs and with "origin/HEAD" pointing to "origin/master",
> "origin@{local}" would be "refs/heads/master". If you created a feature
> branch with
>
> git checkout -b feature origin
>
> and you wanted to merge it into the local branch corresponding to the
> default branch on its upstream remote you could do
>
> git checkout feature@{upstream}@{local}
> git merge feature
I do not know if that is what Harald is looking for, but I did
wonder if we have use cases like that where we can string together
multiple @{modifier} after a branch name. The @{local} thing that
takes a remote-tracking branch and gives the local branch that would
push to would be a "reverse" of @{push}; I wonder if three is need
for a similar concept for a reverse of @{upstream} and if so, it
would also be @{local-something-else}, and we may want to name this
one not just @{local} but @{local-something}.
That "feature@{upstream}@{local}" notation is a great food for
thought.
Thanks.
next prev parent reply other threads:[~2026-02-02 22:28 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 15:25 [PATCH] revisions: add @{default} shorthand for default branch Harald Nordgren via GitGitGadget
2026-01-29 20:23 ` Junio C Hamano
2026-01-30 10:59 ` Harald Nordgren
2026-01-30 11:12 ` Harald Nordgren
2026-01-30 16:42 ` Junio C Hamano
2026-01-30 20:58 ` Harald Nordgren
2026-01-30 21:56 ` Junio C Hamano
2026-01-31 0:09 ` Harald Nordgren
2026-01-31 19:16 ` Junio C Hamano
2026-01-31 20:22 ` Harald Nordgren
2026-01-31 20:55 ` Harald Nordgren
2026-02-02 12:32 ` Junio C Hamano
2026-02-02 15:30 ` Harald Nordgren
2026-02-02 9:37 ` Phillip Wood
2026-02-02 10:14 ` Harald Nordgren
2026-02-02 19:40 ` D. Ben Knoble
2026-02-02 21:19 ` Harald Nordgren
2026-02-02 21:53 ` Kristoffer Haugsbakk
2026-02-02 22:17 ` Ben Knoble
2026-02-02 22:54 ` Harald Nordgren
2026-02-02 21:33 ` Junio C Hamano
2026-02-02 22:16 ` Ben Knoble
2026-02-02 23:03 ` Harald Nordgren
2026-02-02 21:44 ` Junio C Hamano
2026-02-02 22:56 ` Harald Nordgren
2026-02-03 11:18 ` Harald Nordgren
2026-02-03 14:38 ` Phillip Wood
2026-02-02 22:28 ` Junio C Hamano [this message]
2026-01-30 13:26 ` [PATCH v2] " Harald Nordgren via GitGitGadget
2026-01-30 16:54 ` Kristoffer Haugsbakk
2026-01-30 20:45 ` [PATCH v3] revisions: add @{primary} shorthand for primary branch Harald Nordgren via GitGitGadget
2026-01-31 0:06 ` [PATCH v4] " Harald Nordgren via GitGitGadget
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=xmqqcy2mwzjy.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=haraldnordgren@gmail.com \
--cc=phillip.wood123@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