ls-remote: fall-back to default remotes when no remote specified
[gitweb.git] / git-pull.sh
index 2de4c3aa70c10203aebe4e117b30422e39f41e02..1a4729f7bb29205fb7bc251887dcd4f5237f1659 100755 (executable)
@@ -38,10 +38,10 @@ test -z "$(git ls-files -u)" || die_conflict
 test -f "$GIT_DIR/MERGE_HEAD" && die_merge
 
 strategy_args= diffstat= no_commit= squash= no_ff= ff_only=
-log_arg= verbosity=
+log_arg= verbosity= progress=
 merge_args=
 curr_branch=$(git symbolic-ref -q HEAD)
-curr_branch_short=$(echo "$curr_branch" | sed "s|refs/heads/||")
+curr_branch_short="${curr_branch#refs/heads/}"
 rebase=$(git config --bool branch.$curr_branch_short.rebase)
 while :
 do
@@ -50,6 +50,8 @@ do
                verbosity="$verbosity -q" ;;
        -v|--verbose)
                verbosity="$verbosity -v" ;;
+       --progress)
+               progress=--progress ;;
        -n|--no-stat|--no-summary)
                diffstat=--no-stat ;;
        --stat|--summary)
@@ -214,7 +216,7 @@ test true = "$rebase" && {
        done
 }
 orig_head=$(git rev-parse -q --verify HEAD)
-git fetch $verbosity --update-head-ok "$@" || exit 1
+git fetch $verbosity $progress --update-head-ok "$@" || exit 1
 
 curr_head=$(git rev-parse -q --verify HEAD)
 if test -n "$orig_head" && test "$curr_head" != "$orig_head"
@@ -275,7 +277,7 @@ true)
 *)
        eval="git-merge $diffstat $no_commit $squash $no_ff $ff_only"
        eval="$eval  $log_arg $strategy_args $merge_args"
-       eval="$eval \"$merge_name\" HEAD $merge_head $verbosity"
+       eval="$eval \"\$merge_name\" HEAD $merge_head $verbosity"
        ;;
 esac
 eval "exec $eval"