All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] git add . after removing .git/ in a subdirectory triggers assertion failure
@ 2016-01-08 11:33 Matthieu Moy
  2016-01-08 12:10 ` Duy Nguyen
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu Moy @ 2016-01-08 11:33 UTC (permalink / raw)
  To: git

Hi,

No time to debug this for now, but I have a reproduction script:

mkdir test && cd test
git init sub   
cd sub/
touch foo && git add . && git commit -m"foo"
cd ..
git init
git add sub 
rm -fr sub/.git/
cd sub/
git add .

In short, sub used to be a submodule, but we removed the .git/ and tried
to "git add ." the result.

The last line triggers this:

git: pathspec.c:317: prefix_pathspec: Assertion `item->nowildcard_len <= item->len && item->prefix <= item->len' failed.

Cheers,

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [BUG] git add . after removing .git/ in a subdirectory triggers assertion failure
  2016-01-08 11:33 [BUG] git add . after removing .git/ in a subdirectory triggers assertion failure Matthieu Moy
@ 2016-01-08 12:10 ` Duy Nguyen
  0 siblings, 0 replies; 2+ messages in thread
From: Duy Nguyen @ 2016-01-08 12:10 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: git

On Fri, Jan 8, 2016 at 6:33 PM, Matthieu Moy
<Matthieu.Moy@grenoble-inp.fr> wrote:
> Hi,
>
> No time to debug this for now, but I have a reproduction script:
>
> mkdir test && cd test
> git init sub
> cd sub/
> touch foo && git add . && git commit -m"foo"
> cd ..
> git init
> git add sub
> rm -fr sub/.git/
> cd sub/
> git add .
>
> In short, sub used to be a submodule, but we removed the .git/ and tried
> to "git add ." the result.
>
> The last line triggers this:
>
> git: pathspec.c:317: prefix_pathspec: Assertion `item->nowildcard_len <= item->len && item->prefix <= item->len' failed.

Reported twice in the past and I failed to provide a proper fix:

http://thread.gmane.org/gmane.comp.version-control.git/267095/focus=267404
-- 
Duy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-08 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-08 11:33 [BUG] git add . after removing .git/ in a subdirectory triggers assertion failure Matthieu Moy
2016-01-08 12:10 ` Duy Nguyen

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.