projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More README spelling fixes
[git.git]
/
git-tag-script
diff --git
a/git-tag-script
b/git-tag-script
index
233491b
..
281d192
100755
(executable)
--- a/
git-tag-script
+++ b/
git-tag-script
@@
-1,6
+1,10
@@
#!/bin/sh
#!/bin/sh
-object=${2:-$(cat .git/HEAD)}
-type=$(cat-file -t $object) || exit 1
+# Copyright (c) 2005 Linus Torvalds
+
+: ${GIT_DIR=.git}
+
+object=${2:-$(cat "$GIT_DIR"/HEAD)}
+type=$(git-cat-file -t $object) || exit 1
( echo -e "object $object\ntype $type\ntag $1\n"; cat ) > .tmp-tag
rm -f .tmp-tag.asc
gpg -bsa .tmp-tag && cat .tmp-tag.asc >> .tmp-tag
( echo -e "object $object\ntype $type\ntag $1\n"; cat ) > .tmp-tag
rm -f .tmp-tag.asc
gpg -bsa .tmp-tag && cat .tmp-tag.asc >> .tmp-tag