On Tue, May 21, 2013 at 7:47 PM, Junio C Hamano <gits...@pobox.com> wrote:
> Felipe Contreras <felipe.contre...@gmail.com> writes:
>> On Tue, May 21, 2013 at 11:55 AM, Junio C Hamano <gits...@pobox.com> wrote:
>>> This sounds like a good thing to do.  Perhaps the refspec mapping
>>> can be handled the same way as a backend feature so that you do not
>>> have to unconditionally disable it in the other patch.
>> With my patch the remote helper doesn't need to know about the refspec
>> handling at all, it just works magically.
> The consumers of "git fast-export" do not need to know how to flip
> refspecs when consuming output from "git fast-export", because you
> taught "git fast-export" to do the mapping.
> But doesn't that coin have a flip side?  When somebody else (not
> git) generates a fast-import stream, because these consumers are not
> prepared to flip refspecs, they cannot rename while importing.  All
> the producers have to be taught to do the ref mapping.

Not true. There can be an intermediary in between.

> I do not know if this matters in real life, and even if it did, in
> the eventual ideal world, both importers and exporters would learn
> to do so.

No. Only one side *needs* to learn that.

> So I do not think what you did in your patch is a bad
> design in that sense.  It is a half step in the right direction.

What is the other step, and how would that benefit anyone?

> I however found it somewhat ugly that the interface to specify set
> of refs to traverse history to find the set of objects to export
> stays the same as before, and the ref-mapping arguments are bolted
> on to the machinery, without having any relationship between them.
> The user is free to tell it to export only 'next', while telling it
> to map 'master' to 'trunk', for example.
> This is an external interface that is exposed to any users of "git
> fast-export", so if we go that route, we would have to keep that
> interface working forever, even when later somebody else wants to
> add an interface that only requires ref-mapping arguments (and infer
> what is exported from the left hand side of the refspecs).

Not true. We don't *have* to keep anything forever, we are free to
decide anything we want, and live with the consequences.

If a better approach is found, we can remove this interface in v2.0,
or v3.0, or even v10.0.

Why are we shooting ourselves in the foot in the meantime? We already
have something that works perfectly fine.

Now, I specifically asked if such an interface would make sense,
because there are too many warts, and I did not receive a satisfactory
answer in my opinion. I will explore this interface once more, but I
never received any positive feedback from yours that we indeed want to
teach 'fast-export' to parse refspecs, it's just that the interface to
do so was not ideal; you explicitly said you thought it made more
sense on the other side; the receiver.

Felipe Contreras
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

Reply via email to