Re: Getting a commit sha1 from fast-import in a remote-helper
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Nov 18, 2014, 02:53 UTC
- Message-ID
- <20141118025359.GI4336@google.com>
- In-Reply-To
- <20141118022137.GA8418@glandium.org>
Mike Hommey wrote:
> BTW, if it so happens that all the operations that were done end up > creating objects that already existed for some reason, checkpoint > doesn't do anything, which is fine for the pack and tags, but not > necessarily so for export-marks.
Does something like this help?
Do you have a short script that can demonstrate the failure?
Lazily, Jonathan
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
diff --git i/fast-import.c w/fast-import.c index d0bd285..c3d53c8 100644 --- i/fast-import.c +++ w/fast-import.c @@ -3088,12 +3088,11 @@ static void parse_ls(const char *p, struct branch *b) static void checkpoint(void) { checkpoint_requested = 0; - if (object_count) { + if (object_count) cycle_packfile(); - dump_branches(); - dump_tags(); - dump_marks(); - } + dump_branches(); + dump_tags(); + dump_marks(); } static void parse_checkpoint(void)