From: Felipe Contreras Date: Mon, 26 Nov 2012 11:37:07 GMT Subject: Re: [PATCH] fast-export: Allow pruned-references in mark file Message-ID: In-Reply-To: <7vd2z1xb6c.fsf@alter.siamese.dyndns.org> On Mon, Nov 26, 2012 at 5:03 AM, Junio C Hamano wrote: > Antoine Pelisse writes: > >> fast-export can fail because of some pruned-reference when importing a >> mark file. >> >> The problem happens in the following scenario: >> >> $ git fast-export --export-marks=MARKS master >> (rewrite master) >> $ git prune >> $ git fast-export --import-marks=MARKS master >> >> This might fail if some references have been removed by prune >> because some marks will refer to non-existing commits. >> >> Let's warn when we have a mark for a commit we don't know. >> Also, increment the last_idnum before, so we don't override >> the mark. > > Is this a safe and sane thing to do, and if so why? Could you > describe that in the log message here? Why would fast-export try to export something that was pruned? Doesn't that mean it wasn't reachable? Essentially, if 'git rev-list $foo' can't possibly export this pruned object, why would 'git fast-export $foo' would? Cheers. -- Felipe Contreras