threads / discuss / 49466

git-remote-helper list command question

Subject: git-remote-helper list command question

## tl;dr

3 messages between Oct 2, 2018 and Oct 4, 2018.

replies: 2people: 3as markdown or json

Stanisław Drozd· Oct 2, 2018, 09:43 UTC · lore
I'm trying to write a fast-import-based git remote helper, but I'm not sure what the output of the `list` command should look like. How can I find an example of the format in action?

Thanks, Stan

Jeff King· Oct 2, 2018, 14:35 UTC · re: Stanisław Drozd · lore

Re: git-remote-helper list command question

On Tue, Oct 02, 2018 at 11:43:50AM +0200, Stanisław Drozd wrote:
> I'm trying to write a fast-import-based git remote helper, but I'm not
> sure what the output of the `list` command should look like. How can I
> find an example of the format in action?
There's some documentation in "git help remote-helpers".

For working examples (of this or any other remote-helper stuff), your best bet is the git-remote-http helper that ships with Git. E.g., you should be able to do:

  echo list | git remote-http https://github.com/git/git
to see sample output.
-Peff
Jonathan Nieder· Oct 4, 2018, 04:06 UTC · re: Jeff King · lore

Re: git-remote-helper list command question

Hi,
Jeff King wrote:
> On Tue, Oct 02, 2018 at 11:43:50AM +0200, Stanisław Drozd wrote:
Show 13 quoted lines
>> I'm trying to write a fast-import-based git remote helper, but I'm not
>> sure what the output of the `list` command should look like. How can I
>> find an example of the format in action?
>
> There's some documentation in "git help remote-helpers".
>
> For working examples (of this or any other remote-helper stuff), your
> best bet is the git-remote-http helper that ships with Git. E.g., you
> should be able to do:
>
>   echo list | git remote-http https://github.com/git/git
>
> to see sample output.
Other examples to look at:
 git cinnabar <https://github.com/glandium/git-cinnabar>
 remote-testsvn.c in git.git (though it will be moving to contrib/ and
 then out of git.git fairly soon)

These might be more helpful than git-remote-http because they are fast-import-based helpers.

Thanks and hope that helps, Jonathan

← back to recent threads