Subject: Re: remote helper example with push/fetch capabilities

From: Junio C Hamano <[email-masked]>
Date: Mon, 15 Dec 2014 13:47:20 -0800

Klein W <[email-masked]> writes:

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