git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git rev-parse --git-dir does report yield relative path to git directory, per documentation
@ 2012-05-17  9:03 Jon Seymour
  2012-05-17 16:38 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Jon Seymour @ 2012-05-17  9:03 UTC (permalink / raw)
  To: Git Mailing List

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.

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

end of thread, other threads:[~2012-05-18 19:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-17  9:03 git rev-parse --git-dir does report yield relative path to git directory, per documentation Jon Seymour
2012-05-17 16:38 ` Junio C Hamano
2012-05-17 18:23   ` Jonathan Nieder
2012-05-18  9:23     ` [PATCH v1] Documentation: git-rev-parse: clarify that --git-dir does not necessarily show relative paths Jon Seymour
2012-05-18  9:31       ` Jonathan Nieder
2012-05-18 19:24         ` Junio C Hamano
2012-05-18 10:23       ` Nguyen Thai Ngoc Duy

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