From: Johannes Schindelin Date: Thu, 21 Dec 2006 14:13:02 +0000 (+0100) Subject: git-tag: support -F option X-Git-Tag: v1.5.0-rc0~45 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=f79c73ce9ce5d8bd1b4abaf3fc384aa8daa169ef;p=git.git git-tag: support -F option This imitates the behaviour of git-commit. Noticed by Han-Wen Nienhuys. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index 45476c2e4..48b82b86f 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -9,7 +9,8 @@ git-tag - Create a tag object signed with GPG SYNOPSIS -------- [verse] -'git-tag' [-a | -s | -u ] [-f | -d] [-m ] [] +'git-tag' [-a | -s | -u ] [-f | -d] [-m | -F ] + [] 'git-tag' -l [] DESCRIPTION @@ -60,6 +61,9 @@ OPTIONS -m :: Use the given tag message (instead of prompting) +-F :: + Take the tag message from the given file. Use '-' to + read the message from the standard input. Author ------ diff --git a/git-tag.sh b/git-tag.sh index d53f94cd9..36cd6aa25 100755 --- a/git-tag.sh +++ b/git-tag.sh @@ -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