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

Re: [PATCH] fast-import: do not truncate exported marks file

From
Junio C Hamano <gitster@pobox.com>
Date
May 18, 2016, 03:59 UTC
Message-ID
<CAPc5daVJCfnEfA1sHrAGsXaA-80kFV4_4Hd0tLOMocE+qVV=-Q@mail.gmail.com>
In-Reply-To
<CAMP44s1WDzRAFV8iNj_RYiiRwJdBcuUDVR-Ew5FF37qdpEO5Mg@mail.gmail.com>

On Tue, May 17, 2016 at 8:31 PM, Felipe Contreras <felipe.contreras@gmail.com> wrote:

Show 10 quoted lines
> On Tue, May 17, 2016 at 5:22 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>
>>  - Even if we are reading from somewhere, export_marks_file can
>>    point at a completely new file that is different from
>>    import_marks file, in which case, we are not really losing any
>>    information by freshly creating a new marks file, no?
>
> Right, we are not losing any information, but we are not gaining much
> either: it's a truncated version of the import marks.

Ah, if we finished reading from the marks file and then die elsewhere, the new conditional that says "don't clobber if we haven't finished reading" would not have any effect, right. We'll see the imported ones plus some of the new ones.

And if we didn't read anything but have export defined, then we can overwrite the existing marks file, but that is nothing new.

Show 5 quoted lines
>>  - Even if we did not read from any existing marks file, if we are
>>    given export_marks_file that names an existing file, wouldn't we
>>    want to avoid corrupting it with a dump from this aborted run?
>
> If we don't run from an existing marks file, this patch has no effect.

Yes, that is exactly what I was wondering if we may want to improve while at it.

Previous: Felipe ContrerasNext: Felipe Contreras
Message 4 of 6 in “fast-import: do not truncate exported marks file”
  1. fast-import: do not truncate exported marks fileFelipe Contreras, May 17, 2016
  2. Junio C HamanoMay 17, 2016
  3. Felipe ContrerasMay 18, 2016
  4. Junio C HamanoMay 18, 2016
  5. Felipe ContrerasMay 18, 2016
  6. Junio C HamanoMay 18, 2016

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.