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

git diff-files weirdness (bug?)

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
May 23, 2008, 14:20 UTC
Message-ID
<b0943d9e0805230720h61cbabbbw180908e1b28a34cc@mail.gmail.com>
Hi,

I was investigating a bug in "stg refresh" failing with moved files and noticed that it was caused by Git (HEAD pulled yesterday):

  git init
  touch a
  git add a
  git commit -m "test"
  git mv a b
These are OK:
  git diff-files -- a
  git diff-files -- b
These fail:
  git diff-files -- a b
  git diff-files -- a c
These are OK:
  git diff-files -- a b c
  git diff-files -- a b c d e
  git diff-files -- c d e
  ...

It looks like the two arguments command is a special case. Passing "-q" doesn't make any difference.

Thanks.
-- 
Catalin
Next: Linus Torvalds
Message 1 of 11 in “git diff-files weirdness (bug?)”
  1. Catalin MarinasMay 23, 2008
  2. Linus TorvaldsMay 23, 2008
  3. Linus TorvaldsMay 23, 2008
  4. diff -- file1 file2: do not default to --no-index inside a git repositoryJohannes Schindelin, May 23, 2008
  5. diff file1 file2: do not default to --no-index inside a git repositoryJohannes Schindelin, May 23, 2008
  6. Junio C HamanoMay 24, 2008
  7. 1/3 tests: do not use implicit "git diff --no-index"Junio C Hamano, May 24, 2008
  8. 2/3 diff-files: do not play --no-index gamesJunio C Hamano, May 24, 2008
  9. 3/3 "git diff": do not ignore index without --no-indexJunio C Hamano, May 24, 2008
  10. Junio C HamanoMay 24, 2008
  11. Junio C HamanoMay 24, 2008

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.