From: Junio C Hamano <gitster@pobox.com>
To: Taylor Blau <me@ttaylorr.com>
Cc: Adina Wagner <a.wagner@fz-juelich.de>, git@vger.kernel.org
Subject: Re: suspected race between packing and fetch (single case study)
Date: Sat, 09 Jan 2021 14:11:55 -0800 [thread overview]
Message-ID: <xmqq35z9g3pw.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <X/ipCPFyW3gAWrHo@nand.local> (Taylor Blau's message of "Fri, 8 Jan 2021 13:48:40 -0500")
Taylor Blau <me@ttaylorr.com> writes:
> Here, I think the issue is less complicated. Since you're cloning from a
> local repository, the 'git clone' command calls 'clone_local()', which
> in turn calls 'copy_or_link_directory()'. If the directory being copied
> changes while being iterated over, the receiving end isn't guaranteed to
> pick up the changes.
>
> Worse, if the source _removes_ a file that hasn't yet been copied, over,
> then the copy will fail, which is what you're seeing here.
And the source that removes a file during a repack would create a
new file to keep the contents of the removed file available (if the
object still matters after the repack), but because we do not retry
our "cp -r" equivalent used in the clone_local(), we may not pick
such a new file up.
So, we probalby should document "git clone --local" that the user
should expect fallout similar to what may happen when they copy a
directory hierarchy with "cp -r src dst" and muck with what is in
"src" while the copy is ongoing.
next prev parent reply other threads:[~2021-01-09 22:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fe9babc8-a3ee-6be4-e4f8-9690cb7c79bd@fz-juelich.de>
2021-01-08 16:39 ` suspected race between packing and fetch (single case study) Adina Wagner
2021-01-08 18:48 ` Taylor Blau
2021-01-09 22:11 ` Junio C Hamano [this message]
2021-01-11 19:25 ` Taylor Blau
2021-01-12 17:46 ` yoh
2021-01-12 18:47 ` Taylor Blau
2021-01-13 14:55 ` yoh
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=xmqq35z9g3pw.fsf@gitster.c.googlers.com \
--to=gitster@pobox.com \
--cc=a.wagner@fz-juelich.de \
--cc=git@vger.kernel.org \
--cc=me@ttaylorr.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.
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).