Linus Torvalds | 839a7a0 | 2005-04-18 12:15:10 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
Junio C Hamano | 521003f | 2005-08-22 21:57:59 -0700 | [diff] [blame] | 3 | # Copyright (c) 2005 Junio C Hamano |
| 4 | # |
| 5 | # Fetch one or more remote refs and merge it/them into the current HEAD. |
| 6 | |
SZEDER Gábor | d8abe14 | 2008-04-06 03:23:43 +0200 | [diff] [blame] | 7 | USAGE='[-n | --no-stat] [--[no-]commit] [--[no-]squash] [--[no-]ff] [-s strategy]... [<fetch-options>] <repo> <head>...' |
freku045@student.liu.se | 806f36d | 2005-12-13 23:30:31 +0100 | [diff] [blame] | 8 | LONG_USAGE='Fetch one or more remote refs and merge it/them into the current HEAD.' |
Junio C Hamano | 533b703 | 2007-01-12 12:52:03 -0800 | [diff] [blame] | 9 | SUBDIRECTORY_OK=Yes |
Junio C Hamano | 8f321a3 | 2007-11-06 01:50:02 -0800 | [diff] [blame] | 10 | OPTIONS_SPEC= |
Junio C Hamano | ae2b0f1 | 2005-11-24 00:12:11 -0800 | [diff] [blame] | 11 | . git-sh-setup |
Shawn O. Pearce | f947413 | 2006-12-28 02:34:48 -0500 | [diff] [blame] | 12 | set_reflog_action "pull $*" |
Shawn O. Pearce | 7eff28a | 2006-12-30 23:32:38 -0500 | [diff] [blame] | 13 | require_work_tree |
Junio C Hamano | 533b703 | 2007-01-12 12:52:03 -0800 | [diff] [blame] | 14 | cd_to_toplevel |
Junio C Hamano | b10ac50 | 2005-08-25 18:15:32 -0700 | [diff] [blame] | 15 | |
Matthieu Moy | d38a30d | 2010-01-12 10:54:44 +0100 | [diff] [blame] | 16 | |
| 17 | die_conflict () { |
| 18 | git diff-index --cached --name-status -r --ignore-submodules HEAD -- |
| 19 | if [ $(git config --bool --get advice.resolveConflict || echo true) = "true" ]; then |
| 20 | die "Pull is not possible because you have unmerged files. |
| 21 | Please, fix them up in the work tree, and then use 'git add/rm <file>' |
| 22 | as appropriate to mark resolution, or use 'git commit -a'." |
| 23 | else |
| 24 | die "Pull is not possible because you have unmerged files." |
| 25 | fi |
| 26 | } |
| 27 | |
| 28 | die_merge () { |
| 29 | if [ $(git config --bool --get advice.resolveConflict || echo true) = "true" ]; then |
| 30 | die "You have not concluded your merge (MERGE_HEAD exists). |
| 31 | Please, commit your changes before you can merge." |
| 32 | else |
| 33 | die "You have not concluded your merge (MERGE_HEAD exists)." |
| 34 | fi |
| 35 | } |
| 36 | |
| 37 | test -z "$(git ls-files -u)" || die_conflict |
| 38 | test -f "$GIT_DIR/MERGE_HEAD" && die_merge |
Junio C Hamano | d1014a1 | 2006-12-31 23:21:50 -0800 | [diff] [blame] | 39 | |
Björn Gustavsson | 1347483 | 2009-10-29 23:08:31 +0100 | [diff] [blame] | 40 | strategy_args= diffstat= no_commit= squash= no_ff= ff_only= |
Tay Ray Chuan | 9839018 | 2010-02-24 20:50:28 +0800 | [diff] [blame] | 41 | log_arg= verbosity= progress= |
Avery Pennarun | ee2c795 | 2009-11-25 21:23:57 -0500 | [diff] [blame] | 42 | merge_args= |
Johannes Schindelin | cd67e4d | 2007-11-28 13:11:07 +0000 | [diff] [blame] | 43 | curr_branch=$(git symbolic-ref -q HEAD) |
Stephen Boyd | 0d12e59 | 2010-03-17 22:10:45 -0700 | [diff] [blame] | 44 | curr_branch_short="${curr_branch#refs/heads/}" |
Johannes Schindelin | cd67e4d | 2007-11-28 13:11:07 +0000 | [diff] [blame] | 45 | rebase=$(git config --bool branch.$curr_branch_short.rebase) |
Jeff King | 29609e6 | 2010-05-25 02:07:25 -0400 | [diff] [blame] | 46 | dry_run= |
David Kastrup | 822f7c7 | 2007-09-23 22:42:08 +0200 | [diff] [blame] | 47 | while : |
Junio C Hamano | 60fb5b2 | 2005-09-25 19:43:51 -0700 | [diff] [blame] | 48 | do |
| 49 | case "$1" in |
Tuncer Ayaz | 7f87aff | 2008-11-15 01:14:24 +0100 | [diff] [blame] | 50 | -q|--quiet) |
Tuncer Ayaz | c6576f9 | 2008-11-17 23:09:30 +0100 | [diff] [blame] | 51 | verbosity="$verbosity -q" ;; |
Tuncer Ayaz | 7f87aff | 2008-11-15 01:14:24 +0100 | [diff] [blame] | 52 | -v|--verbose) |
Tuncer Ayaz | c6576f9 | 2008-11-17 23:09:30 +0100 | [diff] [blame] | 53 | verbosity="$verbosity -v" ;; |
Tay Ray Chuan | 9839018 | 2010-02-24 20:50:28 +0800 | [diff] [blame] | 54 | --progress) |
| 55 | progress=--progress ;; |
SZEDER Gábor | d8abe14 | 2008-04-06 03:23:43 +0200 | [diff] [blame] | 56 | -n|--no-stat|--no-summary) |
Tor Arne Vestbø | a334e12 | 2009-03-01 22:28:28 +0100 | [diff] [blame] | 57 | diffstat=--no-stat ;; |
SZEDER Gábor | d8abe14 | 2008-04-06 03:23:43 +0200 | [diff] [blame] | 58 | --stat|--summary) |
Tor Arne Vestbø | a334e12 | 2009-03-01 22:28:28 +0100 | [diff] [blame] | 59 | diffstat=--stat ;; |
SZEDER Gábor | efb779f | 2008-04-06 03:23:46 +0200 | [diff] [blame] | 60 | --log|--no-log) |
| 61 | log_arg=$1 ;; |
Junio C Hamano | 123ee3c | 2005-11-01 19:30:11 -0800 | [diff] [blame] | 62 | --no-c|--no-co|--no-com|--no-comm|--no-commi|--no-commit) |
| 63 | no_commit=--no-commit ;; |
Lars Hjemli | 5072a32 | 2007-10-29 09:41:18 +0100 | [diff] [blame] | 64 | --c|--co|--com|--comm|--commi|--commit) |
| 65 | no_commit=--commit ;; |
Junio C Hamano | 7d0c688 | 2006-06-23 01:37:02 -0700 | [diff] [blame] | 66 | --sq|--squ|--squa|--squas|--squash) |
| 67 | squash=--squash ;; |
Lars Hjemli | 5072a32 | 2007-10-29 09:41:18 +0100 | [diff] [blame] | 68 | --no-sq|--no-squ|--no-squa|--no-squas|--no-squash) |
| 69 | squash=--no-squash ;; |
| 70 | --ff) |
| 71 | no_ff=--ff ;; |
| 72 | --no-ff) |
| 73 | no_ff=--no-ff ;; |
Björn Gustavsson | 1347483 | 2009-10-29 23:08:31 +0100 | [diff] [blame] | 74 | --ff-only) |
| 75 | ff_only=--ff-only ;; |
Junio C Hamano | 60fb5b2 | 2005-09-25 19:43:51 -0700 | [diff] [blame] | 76 | -s=*|--s=*|--st=*|--str=*|--stra=*|--strat=*|--strate=*|\ |
| 77 | --strateg=*|--strategy=*|\ |
| 78 | -s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy) |
| 79 | case "$#,$1" in |
| 80 | *,*=*) |
Dennis Stosberg | 8096fae | 2006-06-27 18:54:26 +0200 | [diff] [blame] | 81 | strategy=`expr "z$1" : 'z-[^=]*=\(.*\)'` ;; |
Junio C Hamano | 60fb5b2 | 2005-09-25 19:43:51 -0700 | [diff] [blame] | 82 | 1,*) |
| 83 | usage ;; |
| 84 | *) |
| 85 | strategy="$2" |
| 86 | shift ;; |
| 87 | esac |
| 88 | strategy_args="${strategy_args}-s $strategy " |
| 89 | ;; |
Avery Pennarun | ee2c795 | 2009-11-25 21:23:57 -0500 | [diff] [blame] | 90 | -X*) |
| 91 | case "$#,$1" in |
| 92 | 1,-X) |
| 93 | usage ;; |
| 94 | *,-X) |
Junio C Hamano | 14e5d40 | 2010-01-17 22:31:38 -0800 | [diff] [blame] | 95 | xx="-X $(git rev-parse --sq-quote "$2")" |
Avery Pennarun | ee2c795 | 2009-11-25 21:23:57 -0500 | [diff] [blame] | 96 | shift ;; |
| 97 | *,*) |
Junio C Hamano | 14e5d40 | 2010-01-17 22:31:38 -0800 | [diff] [blame] | 98 | xx=$(git rev-parse --sq-quote "$1") ;; |
Avery Pennarun | ee2c795 | 2009-11-25 21:23:57 -0500 | [diff] [blame] | 99 | esac |
| 100 | merge_args="$merge_args$xx " |
| 101 | ;; |
Johannes Schindelin | cd67e4d | 2007-11-28 13:11:07 +0000 | [diff] [blame] | 102 | -r|--r|--re|--reb|--reba|--rebas|--rebase) |
| 103 | rebase=true |
| 104 | ;; |
| 105 | --no-r|--no-re|--no-reb|--no-reba|--no-rebas|--no-rebase) |
| 106 | rebase=false |
| 107 | ;; |
Jeff King | 29609e6 | 2010-05-25 02:07:25 -0400 | [diff] [blame] | 108 | --d|--dr|--dry|--dry-|--dry-r|--dry-ru|--dry-run) |
| 109 | dry_run=--dry-run |
| 110 | ;; |
Jon Loeliger | 93d69d8 | 2005-11-06 23:30:56 -0600 | [diff] [blame] | 111 | -h|--h|--he|--hel|--help) |
| 112 | usage |
| 113 | ;; |
David Kastrup | 822f7c7 | 2007-09-23 22:42:08 +0200 | [diff] [blame] | 114 | *) |
| 115 | # Pass thru anything that may be meant for fetch. |
Junio C Hamano | 619e5a0 | 2005-10-03 15:45:44 -0700 | [diff] [blame] | 116 | break |
Junio C Hamano | 60fb5b2 | 2005-09-25 19:43:51 -0700 | [diff] [blame] | 117 | ;; |
| 118 | esac |
| 119 | shift |
| 120 | done |
| 121 | |
Junio C Hamano | 441ed41 | 2007-12-28 13:58:43 -0800 | [diff] [blame] | 122 | error_on_no_merge_candidates () { |
| 123 | exec >&2 |
| 124 | for opt |
| 125 | do |
| 126 | case "$opt" in |
| 127 | -t|--t|--ta|--tag|--tags) |
| 128 | echo "Fetching tags only, you probably meant:" |
| 129 | echo " git fetch --tags" |
| 130 | exit 1 |
| 131 | esac |
| 132 | done |
| 133 | |
Jan Krüger | 995fc2f | 2009-11-27 08:17:05 -0600 | [diff] [blame] | 134 | if test true = "$rebase" |
| 135 | then |
| 136 | op_type=rebase |
| 137 | op_prep=against |
| 138 | else |
| 139 | op_type=merge |
| 140 | op_prep=with |
| 141 | fi |
| 142 | |
Junio C Hamano | 441ed41 | 2007-12-28 13:58:43 -0800 | [diff] [blame] | 143 | curr_branch=${curr_branch#refs/heads/} |
Junio C Hamano | a6dbf88 | 2009-09-13 13:38:48 -0700 | [diff] [blame] | 144 | upstream=$(git config "branch.$curr_branch.merge") |
Jeff King | a8c9bef | 2009-10-05 15:35:16 -0400 | [diff] [blame] | 145 | remote=$(git config "branch.$curr_branch.remote") |
Junio C Hamano | 441ed41 | 2007-12-28 13:58:43 -0800 | [diff] [blame] | 146 | |
Jeff King | a8c9bef | 2009-10-05 15:35:16 -0400 | [diff] [blame] | 147 | if [ $# -gt 1 ]; then |
Jan Krüger | 995fc2f | 2009-11-27 08:17:05 -0600 | [diff] [blame] | 148 | if [ "$rebase" = true ]; then |
| 149 | printf "There is no candidate for rebasing against " |
| 150 | else |
| 151 | printf "There are no candidates for merging " |
| 152 | fi |
| 153 | echo "among the refs that you just fetched." |
Jeff King | a8c9bef | 2009-10-05 15:35:16 -0400 | [diff] [blame] | 154 | echo "Generally this means that you provided a wildcard refspec which had no" |
| 155 | echo "matches on the remote end." |
| 156 | elif [ $# -gt 0 ] && [ "$1" != "$remote" ]; then |
| 157 | echo "You asked to pull from the remote '$1', but did not specify" |
Jan Krüger | 995fc2f | 2009-11-27 08:17:05 -0600 | [diff] [blame] | 158 | echo "a branch. Because this is not the default configured remote" |
Jeff King | a8c9bef | 2009-10-05 15:35:16 -0400 | [diff] [blame] | 159 | echo "for your current branch, you must specify a branch on the command line." |
| 160 | elif [ -z "$curr_branch" ]; then |
Matthieu Moy | 61e6108 | 2009-04-08 09:24:03 +0200 | [diff] [blame] | 161 | echo "You are not currently on a branch, so I cannot use any" |
| 162 | echo "'branch.<branchname>.merge' in your configuration file." |
Jan Krüger | 995fc2f | 2009-11-27 08:17:05 -0600 | [diff] [blame] | 163 | echo "Please specify which remote branch you want to use on the command" |
Matthieu Moy | 61e6108 | 2009-04-08 09:24:03 +0200 | [diff] [blame] | 164 | echo "line and try again (e.g. 'git pull <repository> <refspec>')." |
| 165 | echo "See git-pull(1) for details." |
Junio C Hamano | a6dbf88 | 2009-09-13 13:38:48 -0700 | [diff] [blame] | 166 | elif [ -z "$upstream" ]; then |
Matthieu Moy | 61e6108 | 2009-04-08 09:24:03 +0200 | [diff] [blame] | 167 | echo "You asked me to pull without telling me which branch you" |
Jan Krüger | 995fc2f | 2009-11-27 08:17:05 -0600 | [diff] [blame] | 168 | echo "want to $op_type $op_prep, and 'branch.${curr_branch}.merge' in" |
| 169 | echo "your configuration file does not tell me, either. Please" |
| 170 | echo "specify which branch you want to use on the command line and" |
Matthieu Moy | 61e6108 | 2009-04-08 09:24:03 +0200 | [diff] [blame] | 171 | echo "try again (e.g. 'git pull <repository> <refspec>')." |
| 172 | echo "See git-pull(1) for details." |
| 173 | echo |
Jan Krüger | 995fc2f | 2009-11-27 08:17:05 -0600 | [diff] [blame] | 174 | echo "If you often $op_type $op_prep the same branch, you may want to" |
| 175 | echo "use something like the following in your configuration file:" |
Matthieu Moy | 61e6108 | 2009-04-08 09:24:03 +0200 | [diff] [blame] | 176 | echo |
Jan Krüger | 995fc2f | 2009-11-27 08:17:05 -0600 | [diff] [blame] | 177 | echo " [branch \"${curr_branch}\"]" |
| 178 | echo " remote = <nickname>" |
| 179 | echo " merge = <remote-ref>" |
| 180 | test rebase = "$op_type" && |
| 181 | echo " rebase = true" |
| 182 | echo |
| 183 | echo " [remote \"<nickname>\"]" |
| 184 | echo " url = <url>" |
| 185 | echo " fetch = <refspec>" |
Matthieu Moy | 61e6108 | 2009-04-08 09:24:03 +0200 | [diff] [blame] | 186 | echo |
| 187 | echo "See git-config(1) for details." |
Junio C Hamano | a6dbf88 | 2009-09-13 13:38:48 -0700 | [diff] [blame] | 188 | else |
Jan Krüger | 995fc2f | 2009-11-27 08:17:05 -0600 | [diff] [blame] | 189 | echo "Your configuration specifies to $op_type $op_prep the ref '${upstream#refs/heads/}'" |
| 190 | echo "from the remote, but no such ref was fetched." |
Matthieu Moy | 61e6108 | 2009-04-08 09:24:03 +0200 | [diff] [blame] | 191 | fi |
Junio C Hamano | 441ed41 | 2007-12-28 13:58:43 -0800 | [diff] [blame] | 192 | exit 1 |
| 193 | } |
| 194 | |
Johannes Schindelin | c85c792 | 2008-01-26 18:04:37 +0000 | [diff] [blame] | 195 | test true = "$rebase" && { |
Jeff King | 19a7fcb | 2009-08-11 23:27:40 -0400 | [diff] [blame] | 196 | if ! git rev-parse -q --verify HEAD >/dev/null |
| 197 | then |
| 198 | # On an unborn branch |
| 199 | if test -f "$GIT_DIR/index" |
| 200 | then |
| 201 | die "updating an unborn branch with changes added to the index" |
| 202 | fi |
| 203 | else |
| 204 | git update-index --ignore-submodules --refresh && |
| 205 | git diff-files --ignore-submodules --quiet && |
| 206 | git diff-index --ignore-submodules --cached --quiet HEAD -- || |
| 207 | die "refusing to pull with rebase: your working tree is not up-to-date" |
| 208 | fi |
Santi Béjar | d44e712 | 2009-07-19 09:45:16 +0200 | [diff] [blame] | 209 | oldremoteref= && |
Johannes Schindelin | c85c792 | 2008-01-26 18:04:37 +0000 | [diff] [blame] | 210 | . git-parse-remote && |
Santi Béjar | d44e712 | 2009-07-19 09:45:16 +0200 | [diff] [blame] | 211 | remoteref="$(get_remote_merge_branch "$@" 2>/dev/null)" && |
| 212 | oldremoteref="$(git rev-parse -q --verify "$remoteref")" && |
| 213 | for reflog in $(git rev-list -g $remoteref 2>/dev/null) |
| 214 | do |
| 215 | if test "$reflog" = "$(git merge-base $reflog $curr_branch)" |
| 216 | then |
| 217 | oldremoteref="$reflog" |
| 218 | break |
| 219 | fi |
| 220 | done |
Johannes Schindelin | c85c792 | 2008-01-26 18:04:37 +0000 | [diff] [blame] | 221 | } |
Miklos Vajna | 2d17985 | 2008-12-03 14:26:50 +0100 | [diff] [blame] | 222 | orig_head=$(git rev-parse -q --verify HEAD) |
Jeff King | 29609e6 | 2010-05-25 02:07:25 -0400 | [diff] [blame] | 223 | git fetch $verbosity $progress $dry_run --update-head-ok "$@" || exit 1 |
| 224 | test -z "$dry_run" || exit 0 |
Junio C Hamano | b10ac50 | 2005-08-25 18:15:32 -0700 | [diff] [blame] | 225 | |
Miklos Vajna | 2d17985 | 2008-12-03 14:26:50 +0100 | [diff] [blame] | 226 | curr_head=$(git rev-parse -q --verify HEAD) |
Junio C Hamano | b0ad11e | 2008-10-14 15:32:20 -0700 | [diff] [blame] | 227 | if test -n "$orig_head" && test "$curr_head" != "$orig_head" |
Junio C Hamano | b10ac50 | 2005-08-25 18:15:32 -0700 | [diff] [blame] | 228 | then |
| 229 | # The fetch involved updating the current branch. |
| 230 | |
| 231 | # The working tree and the index file is still based on the |
| 232 | # $orig_head commit, but we are merging into $curr_head. |
| 233 | # First update the working tree to match $curr_head. |
| 234 | |
| 235 | echo >&2 "Warning: fetch updated the current branch head." |
Felipe Contreras | a75d7b5 | 2009-10-24 11:31:32 +0300 | [diff] [blame] | 236 | echo >&2 "Warning: fast-forwarding your working tree from" |
Junio C Hamano | a057f80 | 2006-10-10 23:00:29 -0700 | [diff] [blame] | 237 | echo >&2 "Warning: commit $orig_head." |
Dan Loewenherz | 7bd93c1 | 2009-04-22 21:46:02 -0400 | [diff] [blame] | 238 | git update-index -q --refresh |
Junio C Hamano | 5be6007 | 2007-07-02 22:52:14 -0700 | [diff] [blame] | 239 | git read-tree -u -m "$orig_head" "$curr_head" || |
Junio C Hamano | 8323124 | 2006-03-22 01:57:11 -0800 | [diff] [blame] | 240 | die 'Cannot fast-forward your working tree. |
| 241 | After making sure that you saved anything precious from |
| 242 | $ git diff '$orig_head' |
| 243 | output, run |
| 244 | $ git reset --hard |
| 245 | to recover.' |
| 246 | |
Junio C Hamano | b10ac50 | 2005-08-25 18:15:32 -0700 | [diff] [blame] | 247 | fi |
| 248 | |
Junio C Hamano | 05dd8e2 | 2005-09-25 22:54:23 -0700 | [diff] [blame] | 249 | merge_head=$(sed -e '/ not-for-merge /d' \ |
| 250 | -e 's/ .*//' "$GIT_DIR"/FETCH_HEAD | \ |
| 251 | tr '\012' ' ') |
Junio C Hamano | e0bfc81 | 2005-08-20 02:57:26 -0700 | [diff] [blame] | 252 | |
| 253 | case "$merge_head" in |
Junio C Hamano | 521003f | 2005-08-22 21:57:59 -0700 | [diff] [blame] | 254 | '') |
Junio C Hamano | 4973aa2 | 2009-10-05 12:03:25 -0700 | [diff] [blame] | 255 | error_on_no_merge_candidates "$@" |
Junio C Hamano | 521003f | 2005-08-22 21:57:59 -0700 | [diff] [blame] | 256 | ;; |
Junio C Hamano | 60fb5b2 | 2005-09-25 19:43:51 -0700 | [diff] [blame] | 257 | ?*' '?*) |
Linus Torvalds | d09e79c | 2006-11-16 11:47:22 -0800 | [diff] [blame] | 258 | if test -z "$orig_head" |
| 259 | then |
Stephen Boyd | bc2bbc4 | 2009-06-14 16:08:56 -0700 | [diff] [blame] | 260 | die "Cannot merge multiple branches into empty head" |
Linus Torvalds | d09e79c | 2006-11-16 11:47:22 -0800 | [diff] [blame] | 261 | fi |
Jay Soffian | 51b2ead | 2009-02-18 08:44:02 -0500 | [diff] [blame] | 262 | if test true = "$rebase" |
| 263 | then |
Stephen Boyd | bc2bbc4 | 2009-06-14 16:08:56 -0700 | [diff] [blame] | 264 | die "Cannot rebase onto multiple branches" |
Jay Soffian | 51b2ead | 2009-02-18 08:44:02 -0500 | [diff] [blame] | 265 | fi |
Junio C Hamano | 60fb5b2 | 2005-09-25 19:43:51 -0700 | [diff] [blame] | 266 | ;; |
| 267 | esac |
| 268 | |
Linus Torvalds | d09e79c | 2006-11-16 11:47:22 -0800 | [diff] [blame] | 269 | if test -z "$orig_head" |
| 270 | then |
Junio C Hamano | b0ad11e | 2008-10-14 15:32:20 -0700 | [diff] [blame] | 271 | git update-ref -m "initial pull" HEAD $merge_head "$curr_head" && |
Junio C Hamano | 5be6007 | 2007-07-02 22:52:14 -0700 | [diff] [blame] | 272 | git read-tree --reset -u HEAD || exit 1 |
Linus Torvalds | d09e79c | 2006-11-16 11:47:22 -0800 | [diff] [blame] | 273 | exit |
| 274 | fi |
| 275 | |
SZEDER Gábor | efb779f | 2008-04-06 03:23:46 +0200 | [diff] [blame] | 276 | merge_name=$(git fmt-merge-msg $log_arg <"$GIT_DIR/FETCH_HEAD") || exit |
Junio C Hamano | 14e5d40 | 2010-01-17 22:31:38 -0800 | [diff] [blame] | 277 | case "$rebase" in |
| 278 | true) |
| 279 | eval="git-rebase $diffstat $strategy_args $merge_args" |
| 280 | eval="$eval --onto $merge_head ${oldremoteref:-$merge_head}" |
| 281 | ;; |
| 282 | *) |
| 283 | eval="git-merge $diffstat $no_commit $squash $no_ff $ff_only" |
| 284 | eval="$eval $log_arg $strategy_args $merge_args" |
Junio C Hamano | 7ecee33 | 2010-01-24 10:11:27 -0800 | [diff] [blame] | 285 | eval="$eval \"\$merge_name\" HEAD $merge_head $verbosity" |
Junio C Hamano | 14e5d40 | 2010-01-17 22:31:38 -0800 | [diff] [blame] | 286 | ;; |
| 287 | esac |
| 288 | eval "exec $eval" |