Re: [PATCH v2 4/4] fast-export: make sure refs are updated properly
- From
Sverre Rabbelier <srabbelier@gmail.com>
- Date
- Oct 30, 2012, 18:12 UTC
- Message-ID
- <CAGdFq_j1RROOwxDi1FfJZJ6wiP9y9FWzSpc7MXVSvRmgk0sF9A@mail.gmail.com>
- In-Reply-To
- <1351617089-13036-5-git-send-email-felipe.contreras@gmail.com>
On Tue, Oct 30, 2012 at 10:11 AM, Felipe Contreras <felipe.contreras@gmail.com> wrote:
Show 21 quoted lines
> When an object has already been exported (and thus is in the marks) it > is flagged as SHOWN, so it will not be exported again, even if this time > it's exported through a different ref. > > We don't need the object to be exported again, but we want the ref > updated, which doesn't happen. > > Since we can't know if a ref was exported or not, let's just assume that > if the commit was marked (flags & SHOWN), the user still wants the ref > updated. > > So: > > % git branch test master > % git fast-export $mark_flags master > % git fast-export $mark_flags test > > Would export 'test' properly. > > Additionally, this fixes issues with remote helpers; now they can push > refs wich objects have already been exported.
Won't this also export child (or maybe parent) branches that weren't mentioned? For example:
$ git branch one $ echo foo > content $ git commit -m two $ git fast-export one $ git fast-export two
I suspect that one of those will export both one and two. If not, this seems like a great solution to the fast-export problem.
-- Cheers, Sverre Rabbelier