Subject: Re: [RFC PATCH] object-name: add @{upstreamhead} shorthand

From: Taylor Blau <[email-masked]>
Date: Mon, 21 Oct 2024 15:45:26 -0400

On Sun, Oct 20, 2024 at 11:42:38PM +0200, Bence Ferdinandy wrote:
> But so the long story short here is that for
> (origin|upstream)/(master|main|trunk) we can already have agnostic code with
> HEAD for the second part and with a patch like this we could have agnostic code
> for the whole thing.

I'm hesitant to pick this up because of what is said in this paragraph.
When you write "(master|main|trunk)", I think you're really spelling
"HEAD". And it's fine to write HEAD in a script when you want to resolve
something to master/main/trunk/etc. without caring which and instead
delegating that to whatever the remote HEAD is.

But determining the upstream of a branch is already easy to do as Peff
points out downthread. So this seems like a band-aid for scripts that do
not care to perform such a resolution themselves.

Thanks,
Taylor