All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: "Martin Ågren" <martin.agren@gmail.com>
Cc: Git List <git@vger.kernel.org>,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Isaac Chou <Isaac.Chou@microfocus.com>,
	Junio C Hamano <gitster@pobox.com>,
	Jonathan Tan <jonathantanmy@google.com>
Subject: Re: [PATCH v3] fast-export: fix regression skipping some merge-commits
Date: Fri, 20 Apr 2018 18:16:05 -0400	[thread overview]
Message-ID: <CAPig+cSKBAq3h4CAe4phFoG+APDV_qzApJgCpYK6AZrjW-+xxw@mail.gmail.com> (raw)
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:
> 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/

> 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>

  reply	other threads:[~2018-04-20 22:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19 21:46 [BUG] Git fast-export with import marks file omits merge commits Isaac Chou
2018-04-19 22:26 ` Elijah Newren
2018-04-19 22:48 ` Junio C Hamano
2018-04-20  5:07   ` Martin Ågren
2018-04-20 13:53     ` Isaac Chou
2018-04-20 18:12       ` [PATCH] fast-export: fix regression skipping some merge-commits Martin Ågren
2018-04-20 18:57         ` Isaac Chou
2018-04-20 19:08           ` [PATCH v2] " Martin Ågren
2018-04-20 19:07         ` [PATCH] " Johannes Schindelin
2018-04-20 19:32           ` Martin Ågren
2018-04-20 21:00             ` Johannes Schindelin
2018-04-20 22:12               ` [PATCH v3] " Martin Ågren
2018-04-20 22:16                 ` Eric Sunshine [this message]
2018-04-21  6:58                   ` Martin Ågren
2018-04-21  3:43                 ` Junio C Hamano
2018-04-21  7:00                   ` Martin Ågren
2018-06-01 19:41                     ` Isaac Chou
2018-06-02  6:48                       ` Duy Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPig+cSKBAq3h4CAe4phFoG+APDV_qzApJgCpYK6AZrjW-+xxw@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=Isaac.Chou@microfocus.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=jonathantanmy@google.com \
    --cc=martin.agren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.