git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Debayan Banerjee <debayanin@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Possible bug with argument parsing in git blame
Date: Sun, 23 May 2010 16:08:54 -0400	[thread overview]
Message-ID: <20100523200853.GA23377@coredump.intra.peff.net> (raw)
In-Reply-To: <AANLkTinMlvmOneGgkIqxE8qWlhoOlqgALl-YHprqPI6h@mail.gmail.com>

On Sun, May 23, 2010 at 07:22:41PM +0530, Debayan Banerjee wrote:

> > I can't reproduce the problem here. For example, in git.git, both of the
> > following produce the same output:
> >
> >  git blame HEAD~5..HEAD~3 alloc.c
> >  git blame HEAD~5..HEAD~3 -- alloc.c
> 
> It seems to happen only if the path has '/' in it. For example alloc.c
> will be parsed fine, but dir/alloc.c wont.

Sorry, I still can't reproduce with:

  mkdir repo && cd repo && git init
  mkdir subdir

  commit() {
    echo content >>subdir/file
    git add subdir/file
    git commit -m foo
  }

  commit; commit; commit; commit; commit

  git blame HEAD~3..HEAD~1 subdir/file >no-dash &&
  git blame HEAD~3..HEAD~1 -- subdir/file >dash &&
  diff no-dash dash &&
  echo ok

So there must be some difference between your setup and my test case.
Can you give more details?

-Peff

PS I tested on a variety of git versions back to v1.5.5, and I couldn't
trigger the problem, so I don't think it is a version issue.

  parent reply	other threads:[~2010-05-23 20:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-17 10:21 Possible bug with argument parsing in git blame Debayan Banerjee
2010-05-23  8:00 ` Jeff King
     [not found]   ` <AANLkTinMlvmOneGgkIqxE8qWlhoOlqgALl-YHprqPI6h@mail.gmail.com>
2010-05-23 20:08     ` Jeff King [this message]
2010-05-24  6:17       ` Debayan Banerjee
2010-05-24  6:46         ` Jeff King

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=20100523200853.GA23377@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=debayanin@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).