Skip to content

Commit

Permalink
git-tag: support -F <file> option
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Dec 22, 2006
1 parent 9e11554 commit f79c73c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Documentation/git-tag.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ git-tag - Create a tag object signed with GPG
SYNOPSIS
--------
[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>]

DESCRIPTION
Expand Down Expand Up @@ -60,6 +61,9 @@ OPTIONS
-m <msg>::
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
------
Expand Down
11 changes: 11 additions & 0 deletions git-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ do
message_given=1
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)
annotate=1
signed=1
Expand Down

0 comments on commit f79c73c

Please sign in to comment.