pull --rebase: exit early when the working directory is dirty
[gitweb.git] / git-pull.sh
index 9ed01fd21919f2e6b849aef20e9496bf52f41f41..0917d0d056573912df60afd7b556efe04eeebae8 100755 (executable)
@@ -54,8 +54,11 @@ then
 fi
 
 # Setup default fast-forward options via `pull.ff`
-pull_ff=$(git config pull.ff)
+pull_ff=$(bool_or_string_config pull.ff)
 case "$pull_ff" in
+true)
+       no_ff=--ff
+       ;;
 false)
        no_ff=--no-ff
        ;;
@@ -81,8 +84,8 @@ do
                diffstat=--no-stat ;;
        --stat|--summary)
                diffstat=--stat ;;
-       --log|--no-log)
-               log_arg=$1 ;;
+       --log|--log=*|--no-log)
+               log_arg="$1" ;;
        --no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit)
                no_commit=--no-commit ;;
        --c|--co|--com|--comm|--commi|--commit)
@@ -190,15 +193,6 @@ esac
 
 error_on_no_merge_candidates () {
        exec >&2
-       for opt
-       do
-               case "$opt" in
-               -t|--t|--ta|--tag|--tags)
-                       echo "It doesn't make sense to pull all tags; you probably meant:"
-                       echo "  git fetch --tags"
-                       exit 1
-               esac
-       done
 
        if test true = "$rebase"
        then