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>maint
parent
9e11554917
commit
f79c73ce9c
|
@ -9,7 +9,8 @@ git-tag - Create a tag object signed with GPG
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
--------
|
--------
|
||||||
[verse]
|
[verse]
|
||||||
'git-tag' [-a | -s | -u <key-id>] [-f | -d] [-m <msg>] <name> [<head>]
|
'git-tag' [-a | -s | -u <key-id>] [-f | -d] [-m <msg> | -F <file>]
|
||||||
|
<name> [<head>]
|
||||||
'git-tag' -l [<pattern>]
|
'git-tag' -l [<pattern>]
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
@ -60,6 +61,9 @@ OPTIONS
|
||||||
-m <msg>::
|
-m <msg>::
|
||||||
Use the given tag message (instead of prompting)
|
Use the given tag message (instead of prompting)
|
||||||
|
|
||||||
|
-F <file>::
|
||||||
|
Take the tag message from the given file. Use '-' to
|
||||||
|
read the message from the standard input.
|
||||||
|
|
||||||
Author
|
Author
|
||||||
------
|
------
|
||||||
|
|
11
git-tag.sh
11
git-tag.sh
|
@ -45,6 +45,17 @@ do
|
||||||
message_given=1
|
message_given=1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
-F)
|
||||||
|
annotate=1
|
||||||
|
shift
|
||||||
|
if test "$#" = "0"; then
|
||||||
|
die "error: option -F needs an argument"
|
||||||
|
exit 2
|
||||||
|
else
|
||||||
|
message="$(cat "$1")"
|
||||||
|
message_given=1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
-u)
|
-u)
|
||||||
annotate=1
|
annotate=1
|
||||||
signed=1
|
signed=1
|
||||||
|
|
Loading…
Reference in New Issue