summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2014-04-25 14:47:02 +0200
committerJan Pokorný <jpokorny@redhat.com>2014-04-25 14:47:02 +0200
commit362deef625b1b5c5bd9cc8353e4c27d750aedeeb (patch)
tree7aa58187fa53df2040e1c0ae386c3ba19e5d66e6
parent1adf4052b99c5c692fad0d3d7be14ce03e48df34 (diff)
downloaddotfiles-362deef625b1b5c5bd9cc8353e4c27d750aedeeb.tar.gz
dotfiles-362deef625b1b5c5bd9cc8353e4c27d750aedeeb.tar.xz
dotfiles-362deef625b1b5c5bd9cc8353e4c27d750aedeeb.zip
Git config: se: subject prefix requires switch as last arg
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r--.gitconfig3
1 files changed, 2 insertions, 1 deletions
diff --git a/.gitconfig b/.gitconfig
index dd6e674..71aaaab 100644
--- a/.gitconfig
+++ b/.gitconfig
@@ -43,7 +43,8 @@
sb = show-branch
# git se @<project name or another optional tag> ....
se = "!git_se() {\
- local subjpfx=\"PATCH\"; [[ $1 =~ ^@* ]] && subjpfx=\"${1#@}][${subjpfx}\" && shift;\
+ local subjpfx=\"PATCH\"; [[ $1 =~ ^@* ]] && [[ ${@:$#} =~ ^-[1-9]* ]]\
+ && subjpfx=\"${1#@}][${subjpfx}\" && shift && echo \"SUBJ prefix: [${subjpfx}]\";\
git send-email --subject-prefix=\"${subjpfx}\" \"$@\";\
}; git_se"
wc = whatchanged