From: Junio C Hamano Date: Fri, 04 Dec 2009 17:32:49 GMT Subject: Re: rev-parse --show-cdup in .git Message-ID: <7vhbs6skzi.fsf@alter.siamese.dyndns.org> In-Reply-To: <4B192EAE.8000806@drmicha.warpmail.net> Michael J Gruber writes: > I'm sure this was discussed somewhere, but I can't find it: > > When called from within .git, git rev-parse --show-cdup returns nothing > rather than "..", not even an error code. Is this intended? I do not think --show-cdup should be linked to --is-inside-work-tree in any way, if that is what you are getting at by mentioning "error code". > This is all the more disturbing since the cwd of hooks seems to be > GIT_DIR. Is that something one can rely upon? In that case one can > simply use ".." for cdup. I think you will see something that is different from and is more sensible than ".." when you use GIT_WORK_TREE environment variable (or its corresponding configuration variable).