Re: [RFC PATCH] object-name: add @{upstreamhead} shorthand
- From
Bence Ferdinandy <bence@ferdinandy.com>
- Date
- Oct 21, 2024, 20:11 UTC
- Message-ID
- <D51RA8GNVDC9.1DBQYNQVHEP69@ferdinandy.com>
- In-Reply-To
- <ZxavVmjsshVHCPcL@nand.local>
On Mon Oct 21, 2024 at 21:45, Taylor Blau <me@ttaylorr.com> wrote:
Show 15 quoted lines
> 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.
Agreed, Peff's idea to make querying remote easier is a much better way.
Best, Bence
-- bence.ferdinandy.com