git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Possible bug with argument parsing in git blame

From
Jeff King <peff@peff.net>
Date
May 23, 2010, 20:08 UTC
Message-ID
<20100523200853.GA23377@coredump.intra.peff.net>
In-Reply-To
<AANLkTinMlvmOneGgkIqxE8qWlhoOlqgALl-YHprqPI6h@mail.gmail.com>
On Sun, May 23, 2010 at 07:22:41PM +0530, Debayan Banerjee wrote:
Show 8 quoted lines
> > 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.

Previous: Jeff KingNext: Debayan Banerjee
Message 3 of 5 in “Possible bug with argument parsing in git blame”
  1. Debayan BanerjeeMay 17, 2010
  2. Jeff KingMay 23, 2010
  3. Jeff KingMay 23, 2010
  4. Debayan BanerjeeMay 24, 2010
  5. Jeff KingMay 24, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.