On Fri, 2007-09-07 at 14:44 -0700, Junio C Hamano wrote: > Josh England <jjengla@xxxxxxxxxxx> writes: > > > ... there doesn't seem to be a > > good way to access the top of the working tree from within the GIT_DIR. > > Since I now know that post-receive has a CWD in .git, I could just use > > `pwd`/../ , but I was hoping for a better (read: consistent between > > hooks) solution. > > I do not think it is a bad thing for _your_ script to have the > knowledge that in _your_ repositories everywhere, the top of the > work tree is $GIT_DIR/.. and there is no repository that lacks a > work tree. Obviously that would not work for people with bare > repositories, but they would not be using _your_ script in their > bare repositories, so that is Ok. OK. Fair enough. Maybe it would be good to note in git-sh-setup.sh that many of the supplied functions will not work when called from within $GIT_DIR. -JE - 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