All of lore.kernel.org
 help / color / mirror / Atom feed
* assert failed in pathspec.c
@ 2016-02-11  3:59 Dingyuan Wang
  2016-02-11  8:24 ` Torsten Bögershausen
  2016-02-11 16:13 ` Junio C Hamano
  0 siblings, 2 replies; 4+ messages in thread
From: Dingyuan Wang @ 2016-02-11  3:59 UTC (permalink / raw)
  To: git

Hi all,

I've got an assertion error when `git add .`

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

I think the repo doesn't have anything interesting.
No submodules or subrepos. It's like:

repo/
 .gitignore
 .git/
 scripts/
  .gitignore
  foo.py
  bar.json
 something/
 someanother/
 other/         (gitignored)
  scripts.git/  (original .git for scripts/)
  foo.txt

With

modified:   ../something/a.txt
modified:   ../someanother/b.txt
...

Working directory is repo/scripts.

I think the bug is related to this post: [assert failed in submodule
edge case](https://marc.info/?l=git&m=142894416621088&w=2).

(gdb) r
Starting program: /home/gumble/software/git-master/git-add .
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
git-add: pathspec.c:317: prefix_pathspec: Assertion
`item->nowildcard_len <= item->len && item->prefix <= item->len' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff6fc8507 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:55
55	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff6fc8507 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007ffff6fc98da in __GI_abort () at abort.c:89
#2  0x00007ffff6fc159d in __assert_fail_base (fmt=0x7ffff70fe6b8
"%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
    assertion=assertion@entry=0x56ffe0 "item->nowildcard_len <=
item->len && item->prefix <= item->len", file=file@entry=0x5701a6
"pathspec.c", line=line@entry=317,
    function=function@entry=0x5701d0 <__PRETTY_FUNCTION__.22386>
"prefix_pathspec") at assert.c:92
#3  0x00007ffff6fc1652 in __GI___assert_fail
(assertion=assertion@entry=0x56ffe0 "item->nowildcard_len <= item->len
&& item->prefix <= item->len", file=file@entry=0x5701a6 "pathspec.c",
    line=line@entry=317, function=function@entry=0x5701d0
<__PRETTY_FUNCTION__.22386> "prefix_pathspec") at assert.c:101
#4  0x00000000004deb3e in prefix_pathspec (elt=0x7fffffffe3f5 ".",
prefixlen=8, prefix=0x7e71f3 "scripts/", flags=50, raw=0x7fffffffe0a0,
p_short_magic=<synthetic pointer>, item=<optimized out>)
    at pathspec.c:316
#5  parse_pathspec (pathspec=pathspec@entry=0x7fffffffd530,
magic_mask=magic_mask@entry=0, flags=flags@entry=50,
prefix=prefix@entry=0x7e71f3 "scripts/", argv=argv@entry=0x7fffffffe0a0)
at pathspec.c:417
#6  0x0000000000406423 in cmd_add (argc=<optimized out>,
argv=0x7fffffffe0a0, prefix=0x7e71f3 "scripts/") at builtin/add.c:364
#7  0x0000000000405cc8 in run_builtin (argv=0x7fffffffe098, argc=2,
p=0x7b2520 <commands>) at git.c:352
#8  handle_builtin (argc=2, argv=0x7fffffffe098) at git.c:542
#9  0x0000000000404e7a in main (argc=2, av=<optimized out>) at git.c:665


--
Dingyuan Wang

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

* Re: assert failed in pathspec.c
  2016-02-11  3:59 assert failed in pathspec.c Dingyuan Wang
@ 2016-02-11  8:24 ` Torsten Bögershausen
  2016-02-11  8:56   ` Dingyuan Wang
  2016-02-11 16:13 ` Junio C Hamano
  1 sibling, 1 reply; 4+ messages in thread
From: Torsten Bögershausen @ 2016-02-11  8:24 UTC (permalink / raw)
  To: Dingyuan Wang, git

On 02/11/2016 04:59 AM, Dingyuan Wang wrote:
[]

Thanks for the bug report.

What does
git --version
give you ?

And what happens, if you run the latest version of Git ?

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

* Re: assert failed in pathspec.c
  2016-02-11  8:24 ` Torsten Bögershausen
@ 2016-02-11  8:56   ` Dingyuan Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Dingyuan Wang @ 2016-02-11  8:56 UTC (permalink / raw)
  To: Torsten Bögershausen, git

git version 2.7.0.GIT (latest git master)

Sorry, I have found out that this problem is exactly the same as the
previous post I mentioned.

When I created the repo, scripts/ was a subrepo, and then I moved
scripts/.git out. If I add files in the scripts/ dir, SIGABRT.

在 2016年02月11日 16:24, Torsten Bögershausen 写道:
> On 02/11/2016 04:59 AM, Dingyuan Wang wrote:
> []
> 
> Thanks for the bug report.
> 
> What does
> git --version
> give you ?
> 
> And what happens, if you run the latest version of Git ?
> 

-- 
Dingyuan Wang

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

* Re: assert failed in pathspec.c
  2016-02-11  3:59 assert failed in pathspec.c Dingyuan Wang
  2016-02-11  8:24 ` Torsten Bögershausen
@ 2016-02-11 16:13 ` Junio C Hamano
  1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2016-02-11 16:13 UTC (permalink / raw)
  To: Dingyuan Wang; +Cc: git, Nguyễn Thái Ngọc Duy

Dingyuan Wang <abcdoyle888@gmail.com> writes:

> Hi all,
>
> I've got an assertion error when `git add .`
>
> git: pathspec.c:317: prefix_pathspec: Assertion `item->nowildcard_len <=
> item->len && item->prefix <= item->len' failed.
> Aborted (core dumped)

Sounds like http://article.gmane.org/gmane.comp.version-control.git/283549

>
> I think the repo doesn't have anything interesting.
> No submodules or subrepos. It's like:
>
> repo/
>  .gitignore
>  .git/
>  scripts/
>   .gitignore
>   foo.py
>   bar.json
>  something/
>  someanother/
>  other/         (gitignored)
>   scripts.git/  (original .git for scripts/)
>   foo.txt
>
> With
>
> modified:   ../something/a.txt
> modified:   ../someanother/b.txt
> ...
>
> Working directory is repo/scripts.
>
> I think the bug is related to this post: [assert failed in submodule
> edge case](https://marc.info/?l=git&m=142894416621088&w=2).
>
> (gdb) r
> Starting program: /home/gumble/software/git-master/git-add .
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> git-add: pathspec.c:317: prefix_pathspec: Assertion
> `item->nowildcard_len <= item->len && item->prefix <= item->len' failed.
>
> Program received signal SIGABRT, Aborted.
> 0x00007ffff6fc8507 in __GI_raise (sig=sig@entry=6) at
> ../sysdeps/unix/sysv/linux/raise.c:55
> 55	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
> (gdb) bt
> #0  0x00007ffff6fc8507 in __GI_raise (sig=sig@entry=6) at
> ../sysdeps/unix/sysv/linux/raise.c:55
> #1  0x00007ffff6fc98da in __GI_abort () at abort.c:89
> #2  0x00007ffff6fc159d in __assert_fail_base (fmt=0x7ffff70fe6b8
> "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
>     assertion=assertion@entry=0x56ffe0 "item->nowildcard_len <=
> item->len && item->prefix <= item->len", file=file@entry=0x5701a6
> "pathspec.c", line=line@entry=317,
>     function=function@entry=0x5701d0 <__PRETTY_FUNCTION__.22386>
> "prefix_pathspec") at assert.c:92
> #3  0x00007ffff6fc1652 in __GI___assert_fail
> (assertion=assertion@entry=0x56ffe0 "item->nowildcard_len <= item->len
> && item->prefix <= item->len", file=file@entry=0x5701a6 "pathspec.c",
>     line=line@entry=317, function=function@entry=0x5701d0
> <__PRETTY_FUNCTION__.22386> "prefix_pathspec") at assert.c:101
> #4  0x00000000004deb3e in prefix_pathspec (elt=0x7fffffffe3f5 ".",
> prefixlen=8, prefix=0x7e71f3 "scripts/", flags=50, raw=0x7fffffffe0a0,
> p_short_magic=<synthetic pointer>, item=<optimized out>)
>     at pathspec.c:316
> #5  parse_pathspec (pathspec=pathspec@entry=0x7fffffffd530,
> magic_mask=magic_mask@entry=0, flags=flags@entry=50,
> prefix=prefix@entry=0x7e71f3 "scripts/", argv=argv@entry=0x7fffffffe0a0)
> at pathspec.c:417
> #6  0x0000000000406423 in cmd_add (argc=<optimized out>,
> argv=0x7fffffffe0a0, prefix=0x7e71f3 "scripts/") at builtin/add.c:364
> #7  0x0000000000405cc8 in run_builtin (argv=0x7fffffffe098, argc=2,
> p=0x7b2520 <commands>) at git.c:352
> #8  handle_builtin (argc=2, argv=0x7fffffffe098) at git.c:542
> #9  0x0000000000404e7a in main (argc=2, av=<optimized out>) at git.c:665
>
>
> --
> Dingyuan Wang

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

end of thread, other threads:[~2016-02-11 16:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-11  3:59 assert failed in pathspec.c Dingyuan Wang
2016-02-11  8:24 ` Torsten Bögershausen
2016-02-11  8:56   ` Dingyuan Wang
2016-02-11 16:13 ` Junio C Hamano

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.