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

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

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Sep 27, 2010, 07:38 UTC
Message-ID
<4CA049FD.5040100@drmicha.warpmail.net>
In-Reply-To
<AANLkTikJ-SN5xmwqhEHcESfQCWvGjSHp3OK1Hi4+0jBL@mail.gmail.com>
Avery Pennarun venit, vidit, dixit 26.09.2010 11:38:
Show 16 quoted lines
> On Sun, Sep 26, 2010 at 12:13 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> 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.
> 
> Ha, of course.  And I do that all the time, so it's silly that I
> somehow forgot for the duration of that email.
> 
> The real surprise was that this *wasn't* the meaning when I was
> outside a git tree :)
Well, DWIM really is DWYTIM ;)
Michael
Previous: Avery PennarunNext: Brandon Casey
Message 6 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.