git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antoine Pelisse <apelisse@gmail.com>
To: git <git@vger.kernel.org>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: BUG: PATHSPEC_PREFER_CWD requires arguments
Date: Fri, 18 Oct 2013 11:21:33 +0200	[thread overview]
Message-ID: <CALWbr2zTZzGZ9fkUonQr77Vn_dfzP57CZR1vNxNJW_touxNstQ@mail.gmail.com> (raw)

Hello,

I ran into the following bug today: "BUG: PATHSPEC_PREFER_CWD requires
arguments". It's not that bad because I'm trying to run `git log
--merge` on an already resolved conflict. Still, I don't think I
should hit a "BUG:" :-)

Here is a script to reproduce:
git init .
>a
git add a
git commit -m"create a"
git branch other
echo "1" >a
git commit -m"add 1" a
git checkout other
echo "2" >a
git commit -m"add 2" a
git merge master
git add a
git log --merge -- a
# Fails with "fatal: BUG: PATHSPEC_PREFER_CWD requires arguments"

Here is what GDB gives me when I break on die():
Breakpoint 1, die (err=0x57e3a8 "BUG: PATHSPEC_PREFER_CWD requires
arguments") at usage.c:97
97              if (die_is_recursing()) {
(gdb) bt
#0  die (err=0x57e3a8 "BUG: PATHSPEC_PREFER_CWD requires arguments")
at usage.c:97
#1  0x00000000004ea58a in parse_pathspec (pathspec=0x7fffffffc288,
magic_mask=31, flags=0, prefix=0x580dad "", argv=0x0) at
pathspec.c:377
#2  0x00000000005097b4 in prepare_show_merge (revs=0x7fffffffc240) at
revision.c:1375
#3  0x000000000050c32e in setup_revisions (argc=2,
argv=0x7fffffffcb08, revs=0x7fffffffc240, opt=0x7fffffffc220) at
revision.c:2147
#4  0x0000000000446efc in cmd_log_init_finish (argc=4,
argv=0x7fffffffcb08, prefix=0x0, rev=0x7fffffffc240,
opt=0x7fffffffc220)
    at builtin/log.c:147
#5  0x000000000044716a in cmd_log_init (argc=4, argv=0x7fffffffcb08,
prefix=0x0, rev=0x7fffffffc240, opt=0x7fffffffc220) at
builtin/log.c:203
#6  0x0000000000448349 in cmd_log (argc=4, argv=0x7fffffffcb08,
prefix=0x0) at builtin/log.c:635
#7  0x000000000040584a in run_builtin (p=0x7bdb30, argc=4,
argv=0x7fffffffcb08) at git.c:314
#8  0x00000000004059d5 in handle_internal_command (argc=4,
argv=0x7fffffffcb08) at git.c:478
#9  0x0000000000405b88 in main (argc=4, av=0x7fffffffcb08) at git.c:575

And here is what bisect found:
commit 9a0872744315da67db3c81eb9270751e31fcc8f5
Author: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date:   Sun Jul 14 15:35:59 2013 +0700

    remove init_pathspec() in favor of parse_pathspec()

    While at there, move free_pathspec() to pathspec.c

    Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

Thanks,
Antoine

             reply	other threads:[~2013-10-18  9:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18  9:21 Antoine Pelisse [this message]
2013-10-19  2:41 ` [PATCH] Fix calling parse_pathspec with no paths nor PATHSPEC_PREFER_* flags Nguyễn Thái Ngọc Duy
2013-10-22 17:21   ` Junio C Hamano
2013-10-22 18:16     ` Junio C Hamano

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=CALWbr2zTZzGZ9fkUonQr77Vn_dfzP57CZR1vNxNJW_touxNstQ@mail.gmail.com \
    --to=apelisse@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.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.
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).