summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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