Merge branch 'pt/pull-log-n'
authorJunio C Hamano <gitster@pobox.com>
Tue, 26 May 2015 20:24:43 +0000 (13:24 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 26 May 2015 20:24:43 +0000 (13:24 -0700)
"git pull --log" and "git pull --no-log" worked as expected, but
"git pull --log=20" did not.

* pt/pull-log-n:
pull: handle --log=<n>

1  2 
git-pull.sh
diff --combined git-pull.sh
index 9005171b74e0a865ecab869a00ab24b08b3b39e7,13e9d37efa61610e13d21f88325a045d276ec776..b8ae0059208f654a888e3a98ce27fc97c422a2af
@@@ -81,8 -81,8 +81,8 @@@ d
                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,6 -190,15 +190,6 @@@ esa
  
  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
@@@ -231,7 -240,7 +231,7 @@@ test true = "$rebase" && 
        if ! git rev-parse -q --verify HEAD >/dev/null
        then
                # On an unborn branch
 -              if test -f "$GIT_DIR/index"
 +              if test -f "$(git rev-parse --git-path index)"
                then
                        die "$(gettext "updating an unborn branch with changes added to the index")"
                fi
@@@ -314,6 -323,7 +314,6 @@@ the
        fi
  fi
  
 -merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit
  case "$rebase" in
  true)
        eval="git-rebase $diffstat $strategy_args $merge_args $rebase_args $verbosity"
        eval="git-merge $diffstat $no_commit $verify_signatures $edit $squash $no_ff $ff_only"
        eval="$eval $log_arg $strategy_args $merge_args $verbosity $progress"
        eval="$eval $gpg_sign_args"
 -      eval="$eval \"\$merge_name\" HEAD $merge_head"
 +      eval="$eval FETCH_HEAD"
        ;;
  esac
  eval "exec $eval"