Thread (5 messages) flat view 5 messages, 3 authors, 2016-06-15

Re: [PATCH] fast-export: Allow pruned-references in mark file

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:55:25

On Mon, Nov 26, 2012 at 5:03 AM, Junio C Hamano [off-list ref] wrote:
Antoine Pelisse [off-list ref] writes:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help