git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Taylor Blau <me@ttaylorr.com>
Date
Oct 21, 2024, 19:45 UTC
Message-ID
<ZxavVmjsshVHCPcL@nand.local>
In-Reply-To
<D50YLOBHJTLS.367TMAOLKL019@ferdinandy.com>
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

Previous: Jeff KingNext: Bence Ferdinandy
Message 13 of 14 in “object-name: add @{upstreamhead} shorthand”
  1. object-name: add @{upstreamhead} shorthandBence Ferdinandy, Oct 20, 2024
  2. Kristoffer HaugsbakkOct 20, 2024
  3. Bence FerdinandyOct 20, 2024
  4. Jeff KingOct 21, 2024
  5. Bence FerdinandyOct 21, 2024
  6. Taylor BlauOct 21, 2024
  7. Jeff KingOct 23, 2024
  8. Bence FerdinandyOct 24, 2024
  9. Jeff KingOct 25, 2024
  10. Bence FerdinandyOct 27, 2024
  11. Taylor BlauOct 27, 2024
  12. Jeff KingOct 28, 2024
  13. Taylor BlauOct 21, 2024
  14. Bence FerdinandyOct 21, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.