@matheusbsbs / matheus-bagliano / commits / f79c73ce9c
Fork 0

git-tag: support -F <file> option

This imitates the behaviour of git-commit. Noticed by Han-Wen Nienhuys. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>

Johannes Schindelin committed Dec 21, 2006 at 15:13 UTC f79c73ce9ce5d8bd1b4abaf3fc384aa8daa169ef
2 files changed +16 -1
Documentation/git-tag.txt
+5 -1
@@ -9,7 +9,8 @@ git-tag - Create a tag object signed with GPG
9 SYNOPSIS
10 --------
11 [verse]
12 -'git-tag' [-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <name> [<head>]
12 +'git-tag' [-a | -s | -u <key-id>] [-f | -d] [-m <msg> | -F <file>]
13 + <name> [<head>]
14 'git-tag' -l [<pattern>]
15
16 DESCRIPTION
@@ -60,6 +61,9 @@ OPTIONS
61 -m <msg>::
62 Use the given tag message (instead of prompting)
63
64 +-F <file>::
65 + Take the tag message from the given file. Use '-' to
66 + read the message from the standard input.
67
68 Author
69 ------
git-tag.sh
+11
@@ -45,6 +45,17 @@ do
45 message_given=1
46 fi
47 ;;
48 + -F)
49 + annotate=1
50 + shift
51 + if test "$#" = "0"; then
52 + die "error: option -F needs an argument"
53 + exit 2
54 + else
55 + message="$(cat "$1")"
56 + message_given=1
57 + fi
58 + ;;
59 -u)
60 annotate=1
61 signed=1