Fix install-doc-quick target
The script starts in a subdirectory of the source directory to muck with a branch whose structure does not have anything to do with the actual work tree. Go up to the top to make it clear that we operate on the whole tree. It also exported GIT_DIR without any good reason. Remove it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Aug 4, 2007 at 23:48 UTC
00d8c5180dde7434930bfbdf20bc296e9241e4fc
1 file changed
+3
-1
Documentation/install-doc-quick.sh
+3
-1
@@ -7,7 +7,7 @@ mandir="$2"
7
SUBDIRECTORY_OK=t
8
USAGE='<refname> <target directory>'
9
. git-sh-setup
10
-export GIT_DIR
10
+cd_to_toplevel
11
12
test -z "$mandir" && usage
13
if ! git rev-parse --verify "$head^0" >/dev/null; then
@@ -18,6 +18,8 @@ fi
18
GIT_INDEX_FILE=`pwd`/.quick-doc.index
19
export GIT_INDEX_FILE
20
rm -f "$GIT_INDEX_FILE"
21
+trap 'rm -f "$GIT_INDEX_FILE"' 0
22
+
23
git read-tree $head
24
git checkout-index -a -f --prefix="$mandir"/
25