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

Re: remote helper example with push/fetch capabilities

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 15, 2014, 21:47 UTC
Message-ID
<xmqqegs0d1qv.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAPCWLt6kxoJJSWAcyH_kW071Md0vc4zeo41hCKBQHd-_pvUMXQ@mail.gmail.com>
Klein W <wineklein@gmail.com> writes:
Show 7 quoted lines
> Is there any example of a remote helper [0] with push and fetch capabilities?
>
> The git-remote-testgit.sh example [1] only has import/export capabilities.
>
> Also, what are the advantages and disadvantages of a remote helper
> with push/fetch capabilities vs a remote helper with import/export
> capabilities?

A helper with push/fetch capabilities is responsible for (and more importantly, "in control of") packdata creation, while helpers that use import/export interface rely on fast-import, which is quite dumb when it comes to storage efficiency of the resulting repository. The former might be more preferrable from the efficiency point of view.

BUT.

Unless your foreign SCM is Git itself, however, it is not practical to write your own pack data generator correctly and efficiently to support push/fetch capabilities anyway, so the choice is often made not because of "advantages vs disadvantages" but because of what you can write in practice.

Previous: Klein WNext: Andrew Mackenzie
Message 7 of 8 in “remote helper example with push/fetch capabilities”
  1. Klein WDec 15, 2014
  2. Jonathan NiederDec 15, 2014
  3. Klein WDec 15, 2014
  4. Jonathan NiederDec 15, 2014
  5. Klein WDec 15, 2014
  6. Klein WDec 18, 2014
  7. Junio C HamanoDec 15, 2014
  8. Andrew MackenzieJan 14, 2015

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.