git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Lehmann <Jens.Lehmann@web.de>
To: fREW Schmidt <frioux@gmail.com>, git@vger.kernel.org
Subject: Re: Bug when moving submodules (I think?)
Date: Fri, 20 Dec 2013 20:13:50 +0100	[thread overview]
Message-ID: <52B496EE.70204@web.de> (raw)
In-Reply-To: <20131218233146.GR17291@wanderlust>

Am 19.12.2013 00:32, schrieb fREW Schmidt:
> I tried to make a script to repro this from scratch but ran into other
> issues, which may or may not be a bug.  I'll put that at the end.
> 
> To repro all you have to do is: 
> 
>  git checkout git://github.com/frioux/dotfiles
>  git reset --hard 92c85161ceec9e52b0b2d2de893ba11f49c80198
>  git mv zsh .zsh
> 
> (sha included so this email continues to be valid in the future)
> 
> You can now see that .git/index.lock has been left behind.

Thanks for the recipe, I can reproduce this crash and am working
on a fix (looks like mv chokes on an empty submodule). I'll look
into the problems you describe below too while doing that.

>  On a
> non-fresh checkout (I'm not sure why my old checkout is special) I get
> the following error:
> 
>  git: builtin/mv.c:248: cmd_mv: Assertion `pos >= 0' failed.
> 
> I assumed this was just related to moving submodules that are in
> subdirectories, but when I do that from a fresh repo I get a different
> error.
> 
>  mkdir -p test/a test/b
>  cd test/a
>  git init
>  touch a.txt
>  git add a.txt
>  git ci -m 'initial commit'
>  cd ../b
>  git init
>  mkdir c
>  touch c/c.txt
>  git submodule add ../a c/a
>  git ci -m 'initial commit'
>  git mv c d
>  git status
> 
> And the error:
> 
>  fatal: Could not chdir to '../../../../c/a': No such file or directory
>  fatal: 'git status --porcelain' failed in submodule d/a

      reply	other threads:[~2013-12-20 19:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18 23:32 Bug when moving submodules (I think?) fREW Schmidt
2013-12-20 19:13 ` Jens Lehmann [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=52B496EE.70204@web.de \
    --to=jens.lehmann@web.de \
    --cc=frioux@gmail.com \
    --cc=git@vger.kernel.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.
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 NNTP newsgroup(s).