Re: [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 26, 2017, 04:25 UTC
- Message-ID
- <xmqqr2uuaxy1.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <598f0addb8b1a5dd535b5bea5f2685ab4c3eb2b0.1506396652.git.e@nanocritical.com>
"Eric Rannaud" <e@nanocritical.com> writes:
Show 5 quoted lines
> The checkpoint command cycles packfiles if object_count != 0, a sensible > test or there would be no pack files to write. Since 820b931012, the > command also dumps branches, tags and marks, but still conditionally. > However, it is possible for a command stream to modify refs or create > marks without creating any new objects.
That reasoning sounds sensible. Especially given the discussion of "checkpoint" and "progress" we can see in "git fast-import --help" documentation. E.g.
Placing a progress command immediately after a checkpoint will
inform the reader when the checkpoint has been completed and it
can safely access the refs that fast-import updated.would not be true without this change, I suspect.
Can we also add a new test or two that protect this from future breakages?
Thanks.