git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Nov 26, 2012, 11:37 UTC
Message-ID
<CAMP44s0iSkqcOW0YsD=Jm_=x1tuoRbFQ+EbVvkROa_yY2-WFcA@mail.gmail.com>
In-Reply-To
<7vd2z1xb6c.fsf@alter.siamese.dyndns.org>
On Mon, Nov 26, 2012 at 5:03 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 21 quoted lines
> Antoine Pelisse <apelisse@gmail.com> 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
Previous: Junio C HamanoNext: Antoine Pelisse
Message 3 of 13 in “fast-export: Allow pruned-references in mark file”
  1. fast-export: Allow pruned-references in mark fileAntoine Pelisse, Nov 24, 2012
  2. Junio C HamanoNov 26, 2012
  3. Felipe ContrerasNov 26, 2012
  4. Antoine PelisseNov 26, 2012
  5. Felipe ContrerasNov 26, 2012
  6. Antoine PelisseNov 26, 2012
  7. Junio C HamanoNov 26, 2012
  8. Antoine PelisseNov 26, 2012
  9. Felipe ContrerasNov 26, 2012
  10. Junio C HamanoNov 26, 2012
  11. Antoine PelisseDec 1, 2012
  12. fast-export: Allow pruned-references in mark fileAntoine Pelisse, Apr 6, 2013
  13. Felipe ContrerasApr 6, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.