From: Stef Bon <stefbon@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Git Users <git@vger.kernel.org>
Subject: Re: Exec upload-pack on remote with what parameters to get direntries.
Date: Tue, 31 Aug 2021 08:38:39 +0200 [thread overview]
Message-ID: <CANXojczR1hMrzz7t0P6AkqL3kjdk+NzBKyCQnm-9cWFbULifow@mail.gmail.com> (raw)
In-Reply-To: <YS0tNoAa/0VQe1OW@coredump.intra.peff.net>
Hi,
thank you for the answer.
I understand that the core of git is to make people work together when
writing code.
To get a tree of the source files is not directly part of that, but
pure informational. That is also the intent of my fuse fs: provide the
user information about the source files.
Now I have a working ssh connection to the server, and open a channel
for running the upload-pack on the server using the exec channel
request:
https://datatracker.ietf.org/doc/html/rfc4254#section-6.5
So in my program I do not have to do something like:
ssh -x git@server "git-upload-pack 'simplegit-progit.git'"
It is only the sending of an exec message with the right command.
Via the SSH_MSG_CHANNEL_DATA message the server will return the
output. In my program I have to write a parser to get the
tree/direntries.
Now you suggest the git clone --depth 1 --filter=blob:none
--single-branch -b $branch
command. How does that look when writing it in lowlevel git messages
as described in
https://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols
?
I'm programming at this low level, so I have to write the messages to
send to the server myself.
And you mention the api github has for a git tree object. But git2 has
already the git_tree object?
Stef
My project by the way is: https://github.com/stefbon/OSNS
next prev parent reply other threads:[~2021-08-31 6:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-28 12:56 Exec upload-pack on remote with what parameters to get direntries Stef Bon
2021-08-30 19:10 ` Jeff King
2021-08-30 19:43 ` Junio C Hamano
2021-08-30 20:46 ` Jeff King
2021-08-30 21:21 ` Junio C Hamano
2021-08-31 14:23 ` Ævar Arnfjörð Bjarmason
2021-08-31 15:35 ` Bruno Albuquerque
2021-08-31 16:23 ` Junio C Hamano
2021-08-31 6:38 ` Stef Bon [this message]
2021-08-31 7:07 ` Jeff King
2021-08-31 9:44 ` Stef Bon
2021-08-31 14:01 ` Ævar Arnfjörð Bjarmason
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANXojczR1hMrzz7t0P6AkqL3kjdk+NzBKyCQnm-9cWFbULifow@mail.gmail.com \
--to=stefbon@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).