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

Re: 'git diff' against files outside a git repo

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 26, 2010, 07:13 UTC
Message-ID
<7vwrq9m0y0.fsf@alter.siamese.dyndns.org>
In-Reply-To
<AANLkTikpPQM4GyP5O7+aw6_P9_1DdxUjTzpH=WhzW=wK@mail.gmail.com>
Avery Pennarun <apenwarr@gmail.com> writes:
> Oddly, 'git diff file1 file2' *doesn't* work when file1 and file2 are
> in a working tree; git tries to diff something, apparently, but I
> don't know what.

Heh, I thought you've been using git long enough that you sh/would know that you are comparing the index and the working tree, using "file1" and "file2" as pathspecs.

Previous: Avery PennarunNext: Avery Pennarun
Message 4 of 7 in “'git diff' against files outside a git repo”
  1. Avery PennarunSep 24, 2010
  2. Elijah NewrenSep 24, 2010
  3. Avery PennarunSep 25, 2010
  4. Junio C HamanoSep 26, 2010
  5. Avery PennarunSep 26, 2010
  6. Michael J GruberSep 27, 2010
  7. Brandon CaseySep 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.