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

Re: Testing for existence of a remote branch from a script

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 6, 2025, 18:44 UTC
Message-ID
<xmqqy0znye76.fsf@gitster.g>
In-Reply-To
<20250106163636.GH1284777@mit.edu>
"Theodore Ts'o" <tytso@mit.edu> writes:
> So if enhancing the git server's functionality (either via git
> ls-remotes or some other operation) is on the table, ...

Enhancements that do not require breaking backward compatibility is always on the table ;-).

Show 6 quoted lines
> one of the things
> that I would really love is some way of asking the question is "git
> commit <SHA hash>" in the remote repository reachable via some branch
> or git tag?", and optionally, "which git branch/tag should be fetched
> if the testing infrastructure wants to be able to test that specific
> git commit ID?"

Both sounds like a useful thing to do, but I wonder how generic these should be and at the same time how common a narrowed-down feature would suffice. If we try to make it generally very useful, at some point, we'd cross the line where we'd be better off doing "run ssh and execute these Git commands" over the wire X-<.

There are server-side-minded folks who are extending "cat-file --batch" to allow you to ask about objects you do not have but the other end has, if I am not mistaken, by the "remote-object-info" feature?

I wonder if these more advanced "info" about objects you mentioned fit into the picture well as part of it.

Thanks.
Previous: Theodore Ts'oNext: Chris Packham
Message 5 of 7 in “Testing for existence of a remote branch from a script”
  1. Chris PackhamJan 6, 2025
  2. Torsten BögershausenJan 6, 2025
  3. Junio C HamanoJan 6, 2025
  4. Theodore Ts'oJan 6, 2025
  5. Junio C HamanoJan 6, 2025
  6. Chris PackhamJan 6, 2025
  7. Theodore Ts'oJan 6, 2025

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.