1
0
mirror of https://github.com/git/git.git synced 2024-09-22 12:33:54 +02:00

Merge branch 'jk/maint-pull-dry-run-noop' into maint

* jk/maint-pull-dry-run-noop:
  pull: do nothing on --dry-run
This commit is contained in:
Junio C Hamano 2010-06-21 05:40:33 -07:00
commit d0780b0643

View File

@ -43,6 +43,7 @@ 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
@ -104,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
;;
@ -216,7 +220,8 @@ test true = "$rebase" && {
done
}
orig_head=$(git rev-parse -q --verify HEAD)
git fetch $verbosity $progress --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"