"Devin J. Pohly" <djpo...@gmail.com> writes:
> From: "Devin J. Pohly" <djpo...@gmail.com>
> Allow a fetch-style remote helper to issue the notification
> ref <sha1> <name>
> to specify a ref's value during the fetch operation.
> Currently, a remote helper with the "fetch" capability cannot fetch a
> ref unless its sha1 was known when the "list" command was executed.
> This limitation is arbitrary, as the helper may eventually be able to
> determine the correct sha1 as it fetches objects.
While I am not fundamentally against supporting a remote helper that
is not capable of saying what the object names of the tip of its
histories are before doing a lot of work, I do not think it is a
good idea to allow such a helper to claim that it supports "fetch"
capability, for at least two reasons:
* Being able to "list" is essential for "fetch" based helpers, I
think, far from "arbitrary". When running a "git fetch" against
such a remote, we can first issue "list" to see what it has and
avoid asking for the refs that point at the histories we already
have (or the refs that are the same as the last time we fetched
from the remote). I do not offhand know if we do this kind of
optimization, but if we don't, we should.
* Existing versions of "git" that can drive remote helpers that
claim to have "fetch" capability are not prepared to accept an
unknown "refs" protocol message from the helper, so a helper
written for your new semantics of "fetch" capability will not
work with them. The point of capability mechanism is to prevent
such a compatibility issue from breaking the system, and this
patch goes against that spirit.
Such a remote helper should not advertise to support "fetch"
capability, because it does not support it. It can advertise that
it supports "something else" and it is OK to make an updated Git
that knows how to drive a remote helper that lack "fetch" but
support that "something else" work with it.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html