Use sigaction and SA_RESTART in read-tree.c; add option in Makefile.
[gitweb.git] / git-tag.sh
index 16efc5b70ac7ea4f0770530845e35091e71feab6..c74e1b4151a3d05a5825dc7dcba2dfaf1ad9a0fa 100755 (executable)
@@ -1,13 +1,10 @@
 #!/bin/sh
 # Copyright (c) 2005 Linus Torvalds
 
+USAGE='[-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <tagname> [<head>]'
+SUBDIRECTORY_OK='Yes'
 . git-sh-setup
 
-usage () {
-    echo >&2 "Usage: git-tag [-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <tagname> [<head>]"
-    exit 1
-}
-
 annotate=
 signed=
 force=
@@ -88,7 +85,8 @@ if [ "$annotate" ]; then
        exit 1
     }
 
-    ( echo -e "object $object\ntype $type\ntag $name\ntagger $tagger\n";
+    ( printf 'object %s\ntype %s\ntag %s\ntagger %s\n\n' \
+       "$object" "$type" "$name" "$tagger";
       cat "$GIT_DIR"/TAG_FINALMSG ) >"$GIT_DIR"/TAG_TMP
     rm -f "$GIT_DIR"/TAG_TMP.asc "$GIT_DIR"/TAG_FINALMSG
     if [ "$signed" ]; then