* Confusing error message
@ 2010-10-21 8:57 Ralf Baechle
0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2010-10-21 8:57 UTC (permalink / raw)
To: git
$ git checkout master
$ git branch linux-2.6.36-stable
error: Not tracking: ambiguous information for ref refs/heads/master
$
Error suggests the command did fail but the branch was created as expected.
I suggest to turn this into a warning - if at all. I just don't care about
the tracking stuff.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Confusing error message
@ 2012-06-14 22:54 Phil Hord
2012-06-14 23:14 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Phil Hord @ 2012-06-14 22:54 UTC (permalink / raw)
To: git
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'?
This was confusing, so I tried different variants. This one produced
no output, suggesting no differences:
$ git diff -- newfile HEAD^:oldfile
But this one shows me that there are differences:
$ git diff HEAD^:oldfile newfile
And so did this one:
$ git show HEAD -M
Am I spelling the syntax wrong? Is the <ref>:<path> syntax not
allowed on diff? If so, why all the inconsistency?
In case I am misreading something here, here is the unmolested command
and output I am using:
$ git diff Tasker_Servers/Server_Common/GuiConfig.h
HEAD^:./Tasker_Servers/Server_CommonGui/GuiConfig.h
fatal: Path 'Tasker_Servers/Server_CommonGui/GuiConfig.h' exists, but
not 'Tasker_Servers/Server_CommonGui/GuiConfig.h'.
Did you mean 'HEAD^:Tasker_Servers/Server_CommonGui/GuiConfig.h' aka
'HEAD^:./Tasker_Servers/Server_CommonGui/GuiConfig.h'?
$ git --version
git version 1.7.11.rc3.219.g94bee05
Phil
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Confusing error message
2012-06-14 22:54 Phil Hord
@ 2012-06-14 23:14 ` Junio C Hamano
2012-06-14 23:18 ` Junio C Hamano
0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2012-06-14 23:14 UTC (permalink / raw)
To: Phil Hord; +Cc: git
Phil Hord <phil.hord@gmail.com> writes:
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Confusing error message
2012-06-14 23:14 ` Junio C Hamano
@ 2012-06-14 23:18 ` Junio C Hamano
0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2012-06-14 23:18 UTC (permalink / raw)
To: Phil Hord; +Cc: git
Junio C Hamano <gitster@pobox.com> writes:
> Phil Hord <phil.hord@gmail.com> writes:
>
>> 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.
Ah, actually we do have a bolted-on hack to allow you feeding a blob
and a file, but I think you still need to follow the command line
convention of subcommand name (=diff), any dashed options
(e.g. "-R"), any object names (=HEAD^:oldfile) and then finally
pathnames (e.g. "newfile").
Does "git diff -R HEAD^:oldfile newfile" work?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-06-14 23:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-21 8:57 Confusing error message Ralf Baechle
-- strict thread matches above, loose matches on Subject: below --
2012-06-14 22:54 Phil Hord
2012-06-14 23:14 ` Junio C Hamano
2012-06-14 23:18 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).