X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Frev_control%2Fversion_control.sh;fp=scripts%2Frev_control%2Fversion_control.sh;h=5b7ef8cce128d5bc1a5903ac673d4c95a27bd90b;hb=2eab636d6e37cd612c1a77bb50d4e30458724f6a;hp=a981b59c1f91a337339bc0d1ccc8722783acc280;hpb=c859a0445186ba8cb1aa1a7354e4c5b9de7cc0c3;p=feisty_meow.git diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index a981b59c..5b7ef8cc 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -11,11 +11,17 @@ source "$FEISTY_MEOW_SCRIPTS/tty/terminal_titler.sh" ############## +# check git version to see if we can use autostash. +# this appears to be an ubuntu issue, where xenial did not provide it even though the +# feature appeared in git 2.6 and xenial claims it has git version 2.7.4. eventually, +# this version test can go away. gitvertest="$(git version | sed -e 's/git version [0-9]\.//' | sed -e 's/\.0$//' )" +#hmmm: temp below! echo gitvertest is $gitvertest -if [[ $gitvertest > 9 ]]; then - # we believe auto-stash is not available until 2.9, but we are sure it was missing - # on ubuntu xenial with git 2.7.4. +if (( $gitvertest >= 11 )); then + # auto-stash is not available until 2.6 for git, but ubuntu is misreporting or using a + # differing version number somehow. we are sure autostash was missing on ubuntu xenial + # with git 2.7.4 and it's definitely present in zesty with git at 2.11. PULL_ADDITION='--rebase --autostash' fi