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

Re: [PATCH v3] fast-export: fix regression skipping some merge-commits

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Apr 20, 2018, 22:16 UTC
Message-ID
<CAPig+cSKBAq3h4CAe4phFoG+APDV_qzApJgCpYK6AZrjW-+xxw@mail.gmail.com>
In-Reply-To
<20180420221231.4131611-1-martin.agren@gmail.com>
On Fri, Apr 20, 2018 at 6:12 PM, Martin Ågren <martin.agren@gmail.com> wrote:
Show 17 quoted lines
> 7199203937 (object_array: add and use `object_array_pop()`, 2017-09-23)
> noted that the pattern `object = array.objects[--array.nr].item` could
> be abstracted as `object = object_array_pop(&array)`.
>
> Unfortunately, one of the conversions was horribly wrong. Between
> grabbing the last object (i.e., peeking at it) and decreasing the object
> count, the original code would sometimes return early. The updated code
> on the other hand, will always pop the last element, then maybe do the
> early return without doing anything with the object.
>
> The end result is that merge commits where all the parents have still
> not been exported will simply be dropped, meaning that they will be
> completely missing from the exported data.
>
> Re-add a commit when it is not yet time to handle it. An alternative
> that was considered was to peek-then-pop. That carries some risk with it
> since the peeking and poping need to act on the same object, in a
s/poping/popping/
Show 8 quoted lines
> concerted fashion.
>
> Add a test that would have caught this.
>
> Reported-by: Isaac Chou <Isaac.Chou@microfocus.com>
> Analyzed-by: Isaac Chou <Isaac.Chou@microfocus.com>
> Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> Signed-off-by: Martin Ågren <martin.agren@gmail.com>
Previous: Martin ÅgrenNext: Martin Ågren
Message 13 of 18 in “RE: [BUG] Git fast-export with import marks file omits merge commits”
  1. Isaac ChouApr 19, 2018
  2. Elijah NewrenApr 19, 2018
  3. Junio C HamanoApr 19, 2018
  4. Martin ÅgrenApr 20, 2018
  5. Isaac ChouApr 20, 2018
  6. fast-export: fix regression skipping some merge-commitsMartin Ågren, Apr 20, 2018
  7. Isaac ChouApr 20, 2018
  8. fast-export: fix regression skipping some merge-commitsMartin Ågren, Apr 20, 2018
  9. Johannes SchindelinApr 20, 2018
  10. Martin ÅgrenApr 20, 2018
  11. Johannes SchindelinApr 20, 2018
  12. fast-export: fix regression skipping some merge-commitsMartin Ågren, Apr 20, 2018
  13. Eric SunshineApr 20, 2018
  14. Martin ÅgrenApr 21, 2018
  15. Junio C HamanoApr 21, 2018
  16. Martin ÅgrenApr 21, 2018
  17. Isaac ChouJun 1, 2018
  18. Duy NguyenJun 2, 2018

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.