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

Re: Confusing error message

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 14, 2012, 23:14 UTC
Message-ID
<7v395xebal.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CABURp0qE+qJjyrhRFb8-gWucM0=3TpYwDBsnbCPrZNVe3QGQBQ@mail.gmail.com>
Phil Hord <phil.hord@gmail.com> writes:
Show 9 quoted lines
> I messed something up during a rebase in a moved file (probably
> because I had rename detection turned off).  So now I want to fix it.
>
> I think I have the commit amended right, but to be sure I want to diff
> the old file and the new file.
>
>   $ git diff newfile HEAD^:oldfile
>   fatal: Path 'oldfile' exists, but not 'oldfile'.
>   Did you mean 'HEAD^:oldfile' aka 'HEAD^:./oldfile'?

You can feed two blob object names to "git diff", but I do not think there is any provision to compare a blob object and a file in the working tree.

Previous: Phil HordNext: Junio C Hamano
Message 2 of 3 in “Confusing error message”
  1. Phil HordJun 14, 2012
  2. Junio C HamanoJun 14, 2012
  3. Junio C HamanoJun 14, 2012

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.