git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* rev-parse doesn't take pwd into consideration
@ 2008-05-26 19:58 Luciano Rocha
  2008-05-26 20:15 ` Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Luciano Rocha @ 2008-05-26 19:58 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]


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@eurotux.com>
Eurotux Informática, S.A. <http://www.eurotux.com/>

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-05-27 10:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-26 19:58 rev-parse doesn't take pwd into consideration Luciano Rocha
2008-05-26 20:15 ` Junio C Hamano
2008-05-26 21:42   ` Johannes Schindelin
2008-05-26 20:18 ` Teemu Likonen
2008-05-26 20:52   ` Luciano Rocha
2008-05-26 21:35 ` しらいしななこ
2008-05-26 21:44   ` Johannes Schindelin
2008-05-26 21:48   ` Junio C Hamano
2008-05-26 22:14   ` Luciano Rocha
2008-05-26 23:14   ` Luciano Rocha
2008-05-27 10:53   ` しらいしななこ

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).