git rev-parse --git-dir does report yield relative path to git directory, per documentation

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

 



Per this advice in git-rev-parse(1):

     Show $GIT_DIR if defined. Otherwise show the path to the .git
directory, relative to the current directory.

I had expected this:

cd /tmp &&
rm -rf foobar &&
mkdir foobar &&
cd foobar &&
git init &&
mkdir tmp &&
:> tmp/.gitignore &&
git add tmp &&
cd tmp &&
git rev-parse --git-dir

to report:

Initialized empty Git repository in /tmp/foobar/.git/
../.git

but in actual fact it reports:

Initialized empty Git repository in /tmp/foobar/.git/
/tmp/foobar/.git

git version 1.7.10.1.514.ge33c7ea

Am I misunderstanding the meaning of the term "relative" in quote above?

jon.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]