summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zsh/functions/cci11
1 files changed, 5 insertions, 6 deletions
diff --git a/.zsh/functions/cci b/.zsh/functions/cci
index 6d10917..22441d7 100644
--- a/.zsh/functions/cci
+++ b/.zsh/functions/cci
@@ -13,11 +13,6 @@ _ask_$0 ()
fi
}
-_stg_v_$0 ()
-{
- python -c 'from stgit.builtin_version import version; print version'
-}
-
if [[ $# == 0 ]]; then
echo "No message given. Aborting."
return 1
@@ -25,6 +20,10 @@ fi
local message=$1
local tok=__cci__
+local stg_v=$(python -c 'from stgit.builtin_version import version; print version')
+
+# bail out on errors with the python thing
+(( $? )) && return
pushd -q ~
@@ -64,7 +63,7 @@ cstg commit $tok || return
# from 0.16 onwards stg repushes the patches ... pop them again
# this is needed to make the `config push` work
-if is-at-least 0.16 $(_stg_v_$0); then
+if is-at-least 0.16 $stg_v; then
echo ">>> Popping patches, stg thought it had to re-apply"
cstg pop -a -k || return
fi
pan class='insertions'>+8 2013-04-08Makefile: re-include cgit.conf in cgit.mkJohn Keeping1-0/+2 2013-04-08Do not unnecessarily strdup() environment variablesLukas Fleischer1-15/+10 2013-04-08Maŕk cgit_environment members constLukas Fleischer2-12/+12 2013-04-08Return const char * in cgit_{httpscheme, hosturl, rooturl}()Lukas Fleischer3-9/+9 2013-04-08Update git to v1.8.2.1John Keeping4-5/+6 2013-04-07ui-blob: don't segfault when no path is givenJohn Keeping1-1/+1 2013-03-20Convert pager navigation into a unordered listLukas Fleischer3-9/+20 2013-03-20Makefile: remove CGIT-CFLAGS files in clean stageJason A. Donenfeld1-1/+1 2013-03-20ui-summary.c: Move urls variable into print_urls()Lukas Fleischer1-6/+14 2013-03-20Fix colspan valuesLukas Fleischer3-14/+28 2013-03-20html: check return value of writeJason A. Donenfeld1-2/+3 2013-03-20ui-shared: squelch compiler warning.Jason A. Donenfeld1-0/+1 2013-03-20cgit.mk: Use SHELL_PATH_SQ to run gen-version.shJohn Keeping1-1/+1 2013-03-20cgit.mk: don't rebuild everything if CGIT_VERSION changesJohn Keeping1-1/+8 2013-03-20ui-patch: use cgit_version not CGIT_VERSIONJohn Keeping1-1/+1 2013-03-20Makefile: re-use Git's Makefile where possibleJohn Keeping3-119/+80