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, 08:00 UTC
Message-ID
<20100523080002.GB24598@coredump.intra.peff.net>
In-Reply-To
<AANLkTikn1-Ua6G7eAc8UD8DJx0vpc-5-BOoxsi2mx2BC@mail.gmail.com>
On Mon, May 17, 2010 at 03:51:18PM +0530, Debayan Banerjee wrote:
Show 22 quoted lines
> debayan@deep-blur:~/testrepo$ git blame 22621a32..8486802f --
> dir/subdir/newsubdir/b
> 
> 81531975 b                      (debayan 2010-05-13 15:32:17 +0530  1) four
> 81531975 b                      (debayan 2010-05-13 15:32:17 +0530  2) five
> d700ac9c b                      (debayan 2010-05-13 15:33:27 +0530  3) blah
> 2656ab56 b                      (debayan 2010-05-13 15:33:34 +0530  4) bleh
> d0c6e851 b                      (debayan 2010-05-13 15:42:21 +0530  5) foo
> 7bf5510e b                      (debayan 2010-05-13 15:42:53 +0530  6) yo
> c4515289 b                      (debayan 2010-05-13 15:43:10 +0530  7) lala
> a257c7e4 b                      (debayan 2010-05-13 16:03:46 +0530  8) yes
> ed8e4601 b                      (debayan 2010-05-13 16:03:55 +0530  9) np
> e96d14bf dir/subdir/newsubdir/b (debayan 2010-05-13 16:05:05 +0530 10) yo
> dace00d1 dir/subdir/newsubdir/b (debayan 2010-05-13 16:05:11 +0530 11) boye
> 8486802f dir/subdir/newsubdir/b (debayan 2010-05-13 16:07:51 +0530 12) what?
> 
> debayan@deep-blur:~/testrepo$ git blame 22621a32..8486802f
> dir/subdir/newsubdir/b
> fatal: cannot stat path 22621a32..8486802f: No such file or directory
> 
> The only difference between the first and the second command is the
> "--" separator.  Is this normal behaviour?

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

Can you provide the exact set of commands to replicate your repository state and show the failure?

Also, I tested with the current 'master'. Are you using an older version of git?

-Peff
Previous: Debayan BanerjeeNext: Jeff King
Message 2 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.