From: Mark Wooding Date: Sun, 23 Mar 2008 19:34:33 +0000 (+0000) Subject: gitconfig: Improve the git release alias. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/cef39ac844d6471817e261c135fdebeddf8e8b57 gitconfig: Improve the git release alias. --- diff --git a/gitconfig b/gitconfig index 1505132..c1a4d4d 100644 --- a/gitconfig +++ b/gitconfig @@ -47,9 +47,12 @@ egrep = "grep -E" patch = "format-patch -o p -s" release = !"sh -e -c ' \ - ver=${1?version}; \ - shift; \ - git tag -as "$@" -m \"Release $ver.\" \"$ver\"' release" + [ $# -gt 0 ] || { \ + echo >&2 \"usage: git release [OPTS] TAG\"; \ + exit 1; \ + }; \ + ver=$(eval echo \"\\$$#\"); \ + git tag -as -m \"Release $ver.\" \"$@\"' release" amend = !"env EDITOR=true VISUAL=true git commit --amend -a" mailto = "send-email \ --quiet \