From: Adam Dinwoodie <adam@dinwoodie.org>
To: Eric Rannaud <e@nanocritical.com>
Cc: Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, jeremy.serror@gmail.com,
"Shawn O . Pearce" <spearce@spearce.org>,
Ramsay Jones <ramsay@ramsayjones.plus.com>
Subject: Re: [PATCH 1/1] fast-import: checkpoint: dump branches/tags/marks even if object_count==0
Date: Thu, 28 Sep 2017 13:59:16 +0100 [thread overview]
Message-ID: <20170928125916.GB9439@dinwoodie.org> (raw)
In-Reply-To: <5b6001e7db3c57fdd9e6354ed4294e2192524061.1506574951.git.e@nanocritical.com>
On Wed, Sep 27, 2017 at 10:07:41PM -0700, Eric Rannaud wrote:
> The checkpoint command cycles packfiles if object_count != 0, a sensible
> test or there would be no pack files to write. Since 820b931012, the
> command also dumps branches, tags and marks, but still conditionally.
> However, it is possible for a command stream to modify refs or create
> marks without creating any new objects.
>
> For example, reset a branch (and keep fast-import running):
>
> $ git fast-import
> reset refs/heads/master
> from refs/heads/master^
>
> checkpoint
>
> but refs/heads/master remains unchanged.
>
> Other example: a commit command that re-creates an object that already
> exists in the object database.
>
> The man page also states that checkpoint "updates the refs" and that
> "placing a progress command immediately after a checkpoint will inform
> the reader when the checkpoint has been completed and it can safely
> access the refs that fast-import updated". This wasn't always true
> without this patch.
>
> This fix unconditionally calls dump_{branches,tags,marks}() for all
> checkpoint commands. dump_branches() and dump_tags() are cheap to call
> in the case of a no-op.
>
> Add tests to t9300 that observe the (non-packfiles) effects of
> checkpoint.
>
> Signed-off-by: Eric Rannaud <e@nanocritical.com>
> ---
> fast-import.c | 6 +--
> t/t9300-fast-import.sh | 126 +++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 129 insertions(+), 3 deletions(-)
>
>
> Updated to include Junio's latest remarks.
>
> Also adding the necessary PIPE prereq, as pointed out by Ramsay Jones.
Cygwin doesn't have the PIPE prereq; I've just confirmed that the
previous version of this patch has t9300 failing on Cygwin, but this
version passes.
next prev parent reply other threads:[~2017-09-28 12:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 3:30 [PATCH] fast-import: checkpoint: dump branches/tags/marks even if object_count==0 Eric Rannaud
2017-09-26 4:25 ` Junio C Hamano
2017-09-26 9:53 ` [PATCH 1/1] " Eric Rannaud
2017-09-27 3:37 ` Junio C Hamano
2017-09-27 19:46 ` [PATCH] " Eric Rannaud
2017-09-27 23:19 ` Ramsay Jones
2017-09-28 3:48 ` Junio C Hamano
2017-09-28 4:56 ` Eric Rannaud
2017-09-28 5:07 ` [PATCH 1/1] " Eric Rannaud
2017-09-28 10:35 ` Junio C Hamano
2017-09-28 20:30 ` Eric Rannaud
2017-09-28 12:59 ` Adam Dinwoodie [this message]
2017-09-28 21:03 ` [PATCH] " Eric Rannaud
2017-09-29 2:44 ` [PATCH 1/1] " Junio C Hamano
2017-09-29 3:09 ` [PATCH] " Eric Rannaud
2017-09-29 3:51 ` Junio C Hamano
2017-09-29 5:40 ` Eric Rannaud
2017-09-29 9:35 ` Junio C Hamano
2017-09-28 6:02 ` Junio C Hamano
2017-09-28 6:44 ` Eric Rannaud
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170928125916.GB9439@dinwoodie.org \
--to=adam@dinwoodie.org \
--cc=e@nanocritical.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeremy.serror@gmail.com \
--cc=ramsay@ramsayjones.plus.com \
--cc=spearce@spearce.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).