public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Per Cederqvist <cederp@opera•com>
To: git@vger•kernel.org
Cc: ceder@lysator•liu.se
Subject: Re: git clone fails intermittently if source repo is updated
Date: Wed, 18 Apr 2012 10:37:04 +0200	[thread overview]
Message-ID: <4F8E7D30.2010906@opera.com> (raw)
In-Reply-To: <87vckyldrj.fsf@opera.com>

On 04/17/2012 02:54 PM, Per Cederqvist wrote:

> Running "git clone master.git copy" sometimes fails if changes are being
> pushed to master.git.  Likewise, running "git clone mirror.git copy"
> sometimes fails if the mirror is currently fetching changes from
> master.git.
>
> In git 1.7.9 I sometimes get one of two fatal error messages.  In one of
> the cases, git still exits with exit code 0, but the working directory
> of "copy" is not updated with the proper files.  (See below for the
> exact error messages.)
>
> In git 1.7.10 the mirror sometimes ends up in "detached HEAD" state.
> Sometimes it prints a warning message.  (See below for the messages.)
>
> The following shell scripts can reproduce the problem.  I've been using
> a 4-core CPU on Ubuntu 11.04.  I've compiled Git from source.
>
> The first script, test-git-setup.sh, creates the directory "test-git"
> and three git repositories in it: master.git, mirror.git, and committer:
>
 > [...four shellscripts omitted...]

For your convenience, I have now set up a Git repository where you can
get slightly updated versions of the above scripts.  The Gitorious web
page is here:

http://git.lysator.liu.se/ceder/git-clone-fail-demo

You can clone it like this:

git clone git://git.lysator.liu.se/ceder/git-clone-fail-demo.git

I have been able to reproduce the problem on Git 1.6.0 as well, so
this is apparently not a recent regression.

The problem can also be reproduces when you clone, push and fetch via
ssh, but it happens a lot less frequently then.  See the README file in
the git-clone-fail-demo repository for info on how to reproduce it.

> [...]
>
>      /ceder

     /ceder

      reply	other threads:[~2012-04-18  8:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17 12:54 git clone fails intermittently if source repo is updated Per Cederqvist
2012-04-18  8:37 ` Per Cederqvist [this message]

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=4F8E7D30.2010906@opera.com \
    --to=cederp@opera$(echo .)com \
    --cc=ceder@lysator$(echo .)liu.se \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox