X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-pull.sh;h=a09a44ec4ce3d82cebc5f972f09e94c7c35dc948;hb=5bebcd4ecba0791cecaa49d30ddd7ca8ffe03627;hp=246a3a4b373dba87877204c90c9f808dfa93c45c;hpb=8165952517bf82b6a632cefc047ad14f36a74b25;p=git.git diff --git a/git-pull.sh b/git-pull.sh index 246a3a4b3..a09a44ec4 100755 --- a/git-pull.sh +++ b/git-pull.sh @@ -38,11 +38,12 @@ 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="${curr_branch#refs/heads/}" rebase=$(git config --bool branch.$curr_branch_short.rebase) +dry_run= while : do case "$1" in @@ -50,6 +51,8 @@ do verbosity="$verbosity -q" ;; -v|--verbose) verbosity="$verbosity -v" ;; + --progress) + progress=--progress ;; -n|--no-stat|--no-summary) diffstat=--no-stat ;; --stat|--summary) @@ -102,6 +105,9 @@ do --no-r|--no-re|--no-reb|--no-reba|--no-rebas|--no-rebase) rebase=false ;; + --d|--dr|--dry|--dry-|--dry-r|--dry-ru|--dry-run) + dry_run=--dry-run + ;; -h|--h|--he|--hel|--help) usage ;; @@ -214,7 +220,8 @@ test true = "$rebase" && { done } orig_head=$(git rev-parse -q --verify HEAD) -git fetch $verbosity --update-head-ok "$@" || exit 1 +git fetch $verbosity $progress $dry_run --update-head-ok "$@" || exit 1 +test -z "$dry_run" || exit 0 curr_head=$(git rev-parse -q --verify HEAD) if test -n "$orig_head" && test "$curr_head" != "$orig_head"