rev-parse doesn't take pwd into consideration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I was frustrated for some minutes trying to get the HEAD version of a
file, as is in the documentation. Using git's source as an example:
git/Documentation$ git show HEAD:docbook.xsl
fatal: ambiguous argument 'HEAD:docbook.xsl': unknown revision or path
not in the working tree.
Use '--' to separate paths from revisions

<hmmm>

$ git show HEAD -- docbook.xsl
<nil>
$

Seeing in the documentation that the parsing was made by git-rev-parse,
I tried running git-rev-parse directly, ending with the same error.

I tried with the full path, just in case, but it didn't work also
($PWD/docbook.xsl).

Until finally I tried the absolute path as git is concerned, and it
worked.

It works anywhere:
git$ git show HEAD:Documentation/docbook.xsl
<contents>
git/Documentation$ git show HEAD:Documentation/docbook.xsl
<contents>
...

Is it difficult to make rev-parse accept relative path specifications?

-- 
Luciano Rocha <luciano@xxxxxxxxxxx>
Eurotux Informática, S.A. <http://www.eurotux.com/>

Attachment: pgpSz566I6kl1.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux