From: Junio C Hamano Date: Tue, 07 Aug 2007 01:28:53 GMT Subject: Re: [PATCH] (Really) Fix install-doc-quick target Message-ID: <7vhcnc9lpm.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <46B7B10F.4060402@gmail.com> Mark Levedahl writes: > Junio C Hamano wrote: >> Yes. And 00d8c51 obviously "works for me", so there is >> something different between what Mark and I are doing. I cannot >> tell what it is. >> > GZ=1 make quick-install-doc > > ...fails because git-ls-tree is called when cwd=$mandir which is > nowhere under or related to $GIT_DIR. Oops. I am blind. That's right. That command does a chdir on its own. How does this sound? --- diff --git a/Documentation/install-doc-quick.sh b/Documentation/install-doc-quick.sh index 07d227f..bc170f0 100755 --- a/Documentation/install-doc-quick.sh +++ b/Documentation/install-doc-quick.sh @@ -24,10 +24,10 @@ git read-tree $head git checkout-index -a -f --prefix="$mandir"/ if test -n "$GZ"; then - cd "$mandir" - for i in `git ls-tree -r --name-only $head` + git ls-tree -r --name-only $head | + while read path do - gzip < $i > $i.gz && rm $i + gzip "$mandir/$path" done fi rm -f "$GIT_INDEX_FILE"