git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: "Torsten Bögershausen" <tboegi@web.de>,
	"Chris Packham" <judge.packham@gmail.com>,
	GIT <git@vger.kernel.org>, "Eric Ju" <eric.peijian@gmail.com>,
	"Christian Couder" <chriscool@tuxfamily.org>,
	"Jonathan Tan" <jonathantanmy@google.com>
Subject: Re: Testing for existence of a remote branch from a script
Date: Mon, 06 Jan 2025 10:44:45 -0800	[thread overview]
Message-ID: <xmqqy0znye76.fsf@gitster.g> (raw)
In-Reply-To: <20250106163636.GH1284777@mit.edu> (Theodore Ts'o's message of "Mon, 6 Jan 2025 11:36:36 -0500")

"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 ;-).

> 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.

  reply	other threads:[~2025-01-06 18:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-06  4:40 Testing for existence of a remote branch from a script Chris Packham
2025-01-06  6:51 ` Torsten Bögershausen
2025-01-06 15:30   ` Junio C Hamano
2025-01-06 16:36     ` Theodore Ts'o
2025-01-06 18:44       ` Junio C Hamano [this message]
2025-01-06 20:50     ` Chris Packham
2025-01-06 15:05 ` Theodore Ts'o

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=xmqqy0znye76.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=chriscool@tuxfamily.org \
    --cc=eric.peijian@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    --cc=judge.packham@gmail.com \
    --cc=tboegi@web.de \
    --cc=tytso@mit.edu \
    /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;
as well as URLs for NNTP newsgroup(s).