Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 382 lines (353 sloc) 10.483 kB
839a7a0 Add the simple scripts I used to do a merge with content conflicts.
Linus Torvalds authored
1 #!/bin/sh
2 #
521003f [PATCH] Use git-octopus when pulling more than one heads.
Junio C Hamano authored
3 # Copyright (c) 2005 Junio C Hamano
4 #
5 # Fetch one or more remote refs and merge it/them into the current HEAD.
6
533b703 Allow whole-tree operations to be started from a subdirectory
Junio C Hamano authored
7 SUBDIRECTORY_OK=Yes
e3b601d @pyokagan pull: use git-rev-parse --parseopt for option parsing
pyokagan authored
8 OPTIONS_KEEPDASHDASH=
9 OPTIONS_STUCKLONG=Yes
10 OPTIONS_SPEC="\
11 git pull [options] [<repository> [<refspec>...]]
12
13 Fetch one or more remote refs and integrate it/them with the current HEAD.
14 --
15 v,verbose be more verbose
16 q,quiet be more quiet
17 progress force progress reporting
18
19 Options related to merging
20 r,rebase?false|true|preserve incorporate changes by rebasing rather than merging
21 n! do not show a diffstat at the end of the merge
22 stat show a diffstat at the end of the merge
23 summary (synonym to --stat)
24 log?n add (at most <n>) entries from shortlog to merge commit message
25 squash create a single commit instead of doing a merge
26 commit perform a commit if the merge succeeds (default)
27 e,edit edit message before committing
28 ff allow fast-forward
29 ff-only! abort if fast-forward is not possible
30 verify-signatures verify that the named commit has a valid GPG signature
31 s,strategy=strategy merge strategy to use
32 X,strategy-option=option option for selected merge strategy
33 S,gpg-sign?key-id GPG sign commit
34
35 Options related to fetching
36 all fetch from all remotes
37 a,append append to .git/FETCH_HEAD instead of overwriting
38 upload-pack=path path to upload pack on remote end
39 f,force force overwrite of local branch
40 t,tags fetch all tags and associated objects
41 p,prune prune remote-tracking branches no longer on remote
42 recurse-submodules?on-demand control recursive fetching of submodules
43 dry-run dry run
44 k,keep keep downloaded pack
45 depth=depth deepen history of shallow clone
46 unshallow convert to a complete repository
47 update-shallow accept refs that update .git/shallow
48 refmap=refmap specify fetch refmap
49 "
50 test $# -gt 0 && args="$*"
ae2b0f1 git-sh-setup: die if outside git repository.
Junio C Hamano authored
51 . git-sh-setup
a9f5786 @avar i18n: git-pull add git-sh-i18n
avar authored
52 . git-sh-i18n
e3b601d @pyokagan pull: use git-rev-parse --parseopt for option parsing
pyokagan authored
53 set_reflog_action "pull${args+ $args}"
035b5bf @peff pull,rebase: handle GIT_WORK_TREE better
peff authored
54 require_work_tree_exists
533b703 Allow whole-tree operations to be started from a subdirectory
Junio C Hamano authored
55 cd_to_toplevel
b10ac50 Fix pulling into the same branch.
Junio C Hamano authored
56
d38a30d @moy Be more user-friendly when refusing to do something because of conflict.
moy authored
57
58 die_conflict () {
59 git diff-index --cached --name-status -r --ignore-submodules HEAD --
60 if [ $(git config --bool --get advice.resolveConflict || echo true) = "true" ]; then
85af5f8 @avar i18n: git-pull die messages
avar authored
61 die "$(gettext "Pull is not possible because you have unmerged files.
d38a30d @moy Be more user-friendly when refusing to do something because of conflict.
moy authored
62 Please, fix them up in the work tree, and then use 'git add/rm <file>'
91e70e0 @moy merge, pull: stop advising 'commit -a' in case of conflict
moy authored
63 as appropriate to mark resolution and make a commit.")"
d38a30d @moy Be more user-friendly when refusing to do something because of conflict.
moy authored
64 else
85af5f8 @avar i18n: git-pull die messages
avar authored
65 die "$(gettext "Pull is not possible because you have unmerged files.")"
d38a30d @moy Be more user-friendly when refusing to do something because of conflict.
moy authored
66 fi
67 }
68
69 die_merge () {
70 if [ $(git config --bool --get advice.resolveConflict || echo true) = "true" ]; then
85af5f8 @avar i18n: git-pull die messages
avar authored
71 die "$(gettext "You have not concluded your merge (MERGE_HEAD exists).
72 Please, commit your changes before you can merge.")"
d38a30d @moy Be more user-friendly when refusing to do something because of conflict.
moy authored
73 else
85af5f8 @avar i18n: git-pull die messages
avar authored
74 die "$(gettext "You have not concluded your merge (MERGE_HEAD exists).")"
d38a30d @moy Be more user-friendly when refusing to do something because of conflict.
moy authored
75 fi
76 }
77
78 test -z "$(git ls-files -u)" || die_conflict
79 test -f "$GIT_DIR/MERGE_HEAD" && die_merge
d1014a1 fail pull/merge early in the middle of conflicted merge
Junio C Hamano authored
80
66713ef @stephenh pull: allow pull to preserve merges when rebasing
stephenh authored
81 bool_or_string_config () {
82 git config --bool "$1" 2>/dev/null || git config "$1"
83 }
84
1347483 @bjorng Teach 'git merge' and 'git pull' the option --ff-only
bjorng authored
85 strategy_args= diffstat= no_commit= squash= no_ff= ff_only=
efed002 merge/pull: verify GPG signatures of commits being merged
Sebastian Götte authored
86 log_arg= verbosity= progress= recurse_submodules= verify_signatures=
eb2a8d9 @pyokagan pull: handle git-fetch's options as well
pyokagan authored
87 merge_args= edit= rebase_args= all= append= upload_pack= force= tags= prune=
88 keep= depth= unshallow= update_shallow= refmap=
cd67e4d @dscho Teach 'git pull' about --rebase
dscho authored
89 curr_branch=$(git symbolic-ref -q HEAD)
0d12e59 @bebarino pull: replace unnecessary sed invocation
bebarino authored
90 curr_branch_short="${curr_branch#refs/heads/}"
66713ef @stephenh pull: allow pull to preserve merges when rebasing
stephenh authored
91 rebase=$(bool_or_string_config branch.$curr_branch_short.rebase)
6b37dff @avar pull: introduce a pull.rebase option to enable --rebase
avar authored
92 if test -z "$rebase"
93 then
66713ef @stephenh pull: allow pull to preserve merges when rebasing
stephenh authored
94 rebase=$(bool_or_string_config pull.rebase)
6b37dff @avar pull: introduce a pull.rebase option to enable --rebase
avar authored
95 fi
b814da8 @davvid pull: add pull.ff configuration
davvid authored
96
97 # Setup default fast-forward options via `pull.ff`
db9bb28 @pyokagan pull: parse pull.ff as a bool or string
pyokagan authored
98 pull_ff=$(bool_or_string_config pull.ff)
b814da8 @davvid pull: add pull.ff configuration
davvid authored
99 case "$pull_ff" in
eb8dc05 @pyokagan pull: make pull.ff=true override merge.ff
pyokagan authored
100 true)
101 no_ff=--ff
102 ;;
b814da8 @davvid pull: add pull.ff configuration
davvid authored
103 false)
104 no_ff=--no-ff
105 ;;
106 only)
107 ff_only=--ff-only
108 ;;
109 esac
110
111
29609e6 @peff pull: do nothing on --dry-run
peff authored
112 dry_run=
822f7c7 Supplant the "while case ... break ;; esac" idiom
David Kastrup authored
113 while :
60fb5b2 Use git-merge in git-pull (second try).
Junio C Hamano authored
114 do
115 case "$1" in
7f87aff @tuncer Teach/Fix pull/fetch -q/-v options
tuncer authored
116 -q|--quiet)
c6576f9 @tuncer Retain multiple -q/-v occurrences in git pull
tuncer authored
117 verbosity="$verbosity -q" ;;
7f87aff @tuncer Teach/Fix pull/fetch -q/-v options
tuncer authored
118 -v|--verbose)
c6576f9 @tuncer Retain multiple -q/-v occurrences in git pull
tuncer authored
119 verbosity="$verbosity -v" ;;
9839018 @rctay fetch and pull: learn --progress
rctay authored
120 --progress)
121 progress=--progress ;;
bebd2fd @peff pull: propagate --progress to merge
peff authored
122 --no-progress)
123 progress=--no-progress ;;
d8abe14 @szeder merge, pull: introduce '--(no-)stat' option
szeder authored
124 -n|--no-stat|--no-summary)
a334e12 @torarnv git-pull: Allow --stat and --no-stat to be used with --rebase
torarnv authored
125 diffstat=--no-stat ;;
d8abe14 @szeder merge, pull: introduce '--(no-)stat' option
szeder authored
126 --stat|--summary)
a334e12 @torarnv git-pull: Allow --stat and --no-stat to be used with --rebase
torarnv authored
127 diffstat=--stat ;;
5061a44 @pyokagan pull: handle --log=<n>
pyokagan authored
128 --log|--log=*|--no-log)
129 log_arg="$1" ;;
e3b601d @pyokagan pull: use git-rev-parse --parseopt for option parsing
pyokagan authored
130 --no-commit)
123ee3c Add --no-commit to git-merge/git-pull.
Junio C Hamano authored
131 no_commit=--no-commit ;;
e3b601d @pyokagan pull: use git-rev-parse --parseopt for option parsing
pyokagan authored
132 --commit)
5072a32 @hjemli Teach git-pull about --[no-]ff, --no-squash and --commit
hjemli authored
133 no_commit=--commit ;;
8580830 @torvalds "git pull" doesn't know "--edit"
torvalds authored
134 -e|--edit)
135 edit=--edit ;;
136 --no-edit)
137 edit=--no-edit ;;
e3b601d @pyokagan pull: use git-rev-parse --parseopt for option parsing
pyokagan authored
138 --squash)
7d0c688 git-merge --squash
Junio C Hamano authored
139 squash=--squash ;;
e3b601d @pyokagan pull: use git-rev-parse --parseopt for option parsing
pyokagan authored
140 --no-squash)
5072a32 @hjemli Teach git-pull about --[no-]ff, --no-squash and --commit
hjemli authored
141 squash=--no-squash ;;
142 --ff)
143 no_ff=--ff ;;
144 --no-ff)
145 no_ff=--no-ff ;;
1347483 @bjorng Teach 'git merge' and 'git pull' the option --ff-only
bjorng authored
146 --ff-only)
147 ff_only=--ff-only ;;
e3b601d @pyokagan pull: use git-rev-parse --parseopt for option parsing
pyokagan authored
148 -s*|--strategy=*)
149 strategy_args="$strategy_args $1"
150 ;;
151 -X*|--strategy-option=*)
152 merge_args="$merge_args $(git rev-parse --sq-quote "$1")"
153 ;;
154 -r*|--rebase=*)
66713ef @stephenh pull: allow pull to preserve merges when rebasing
stephenh authored
155 rebase="${1#*=}"
156 ;;
e3b601d @pyokagan pull: use git-rev-parse --parseopt for option parsing
pyokagan authored
157 --rebase)
cd67e4d @dscho Teach 'git pull' about --rebase
dscho authored
158 rebase=true
159 ;;
e3b601d @pyokagan pull: use git-rev-parse --parseopt for option parsing
pyokagan authored
160 --no-rebase)
cd67e4d @dscho Teach 'git pull' about --rebase
dscho authored
161 rebase=false
162 ;;
7dce19d @jlehmann fetch/pull: Add the --recurse-submodules option
jlehmann authored
163 --recurse-submodules)
164 recurse_submodules=--recurse-submodules
165 ;;
8f0700d @jlehmann fetch/pull: Add the 'on-demand' value to the --recurse-submodules option
jlehmann authored
166 --recurse-submodules=*)
167 recurse_submodules="$1"
168 ;;
be254a0 @jlehmann Add the 'fetch.recurseSubmodules' config setting
jlehmann authored
169 --no-recurse-submodules)
170 recurse_submodules=--no-recurse-submodules
171 ;;
efed002 merge/pull: verify GPG signatures of commits being merged
Sebastian Götte authored
172 --verify-signatures)
173 verify_signatures=--verify-signatures
174 ;;
175 --no-verify-signatures)
176 verify_signatures=--no-verify-signatures
177 ;;
ea230d8 @bk2204 pull: add the --gpg-sign option.
bk2204 authored
178 --gpg-sign|-S)
179 gpg_sign_args=-S
180 ;;
181 --gpg-sign=*)
182 gpg_sign_args=$(git rev-parse --sq-quote "-S${1#--gpg-sign=}")
183 ;;
184 -S*)
185 gpg_sign_args=$(git rev-parse --sq-quote "$1")
186 ;;
e3b601d @pyokagan pull: use git-rev-parse --parseopt for option parsing
pyokagan authored
187 --dry-run)
29609e6 @peff pull: do nothing on --dry-run
peff authored
188 dry_run=--dry-run
189 ;;
eb2a8d9 @pyokagan pull: handle git-fetch's options as well
pyokagan authored
190 --all|--no-all)
191 all=$1 ;;
192 -a|--append|--no-append)
193 append=$1 ;;
194 --upload-pack=*|--no-upload-pack)
195 upload_pack=$1 ;;
196 -f|--force|--no-force)
197 force="$force $1" ;;
198 -t|--tags|--no-tags)
199 tags=$1 ;;
200 -p|--prune|--no-prune)
201 prune=$1 ;;
202 -k|--keep|--no-keep)
203 keep=$1 ;;
204 --depth=*|--no-depth)
205 depth=$1 ;;
206 --unshallow|--no-unshallow)
207 unshallow=$1 ;;
208 --update-shallow|--no-update-shallow)
209 update_shallow=$1 ;;
210 --refmap=*|--no-refmap)
211 refmap=$1 ;;
87182b1 @drizzd use -h for synopsis and --help for manpage consistently
drizzd authored
212 -h|--help-all)
93d69d8 Refactored merge options into separate merge-options.txt.
Jon Loeliger authored
213 usage
214 ;;
eb2a8d9 @pyokagan pull: handle git-fetch's options as well
pyokagan authored
215 --)
216 shift
217 break
218 ;;
822f7c7 Supplant the "while case ... break ;; esac" idiom
David Kastrup authored
219 *)
e3b601d @pyokagan pull: use git-rev-parse --parseopt for option parsing
pyokagan authored
220 usage
60fb5b2 Use git-merge in git-pull (second try).
Junio C Hamano authored
221 ;;
222 esac
223 shift
224 done
225
66713ef @stephenh pull: allow pull to preserve merges when rebasing
stephenh authored
226 case "$rebase" in
227 preserve)
228 rebase=true
229 rebase_args=--preserve-merges
230 ;;
231 true|false|'')
232 ;;
233 *)
234 echo "Invalid value for --rebase, should be true, false, or preserve"
235 usage
236 exit 1
237 ;;
238 esac
239
441ed41 @gitster "git pull --tags": error out with a better message.
gitster authored
240 error_on_no_merge_candidates () {
241 exec >&2
242
995fc2f @jast pull: clarify advice for the unconfigured error case
jast authored
243 if test true = "$rebase"
244 then
245 op_type=rebase
246 op_prep=against
247 else
248 op_type=merge
249 op_prep=with
250 fi
251
b07f729 pull: use $curr_branch_short more
René Scharfe authored
252 upstream=$(git config "branch.$curr_branch_short.merge")
253 remote=$(git config "branch.$curr_branch_short.remote")
441ed41 @gitster "git pull --tags": error out with a better message.
gitster authored
254
a8c9bef @peff pull: improve advice for unconfigured error case
peff authored
255 if [ $# -gt 1 ]; then
995fc2f @jast pull: clarify advice for the unconfigured error case
jast authored
256 if [ "$rebase" = true ]; then
257 printf "There is no candidate for rebasing against "
258 else
259 printf "There are no candidates for merging "
260 fi
261 echo "among the refs that you just fetched."
a8c9bef @peff pull: improve advice for unconfigured error case
peff authored
262 echo "Generally this means that you provided a wildcard refspec which had no"
263 echo "matches on the remote end."
264 elif [ $# -gt 0 ] && [ "$1" != "$remote" ]; then
265 echo "You asked to pull from the remote '$1', but did not specify"
995fc2f @jast pull: clarify advice for the unconfigured error case
jast authored
266 echo "a branch. Because this is not the default configured remote"
a8c9bef @peff pull: improve advice for unconfigured error case
peff authored
267 echo "for your current branch, you must specify a branch on the command line."
15a147e rebase: use @{upstream} if no upstream specified
Martin von Zweigbergk authored
268 elif [ -z "$curr_branch" -o -z "$upstream" ]; then
269 . git-parse-remote
270 error_on_missing_default_upstream "pull" $op_type $op_prep \
3c02396 @carlosmn Make git-{pull,rebase} message without tracking information friendlier
carlosmn authored
271 "git pull <remote> <branch>"
a6dbf88 @gitster pull: Clarify "helpful" message for another corner case
gitster authored
272 else
995fc2f @jast pull: clarify advice for the unconfigured error case
jast authored
273 echo "Your configuration specifies to $op_type $op_prep the ref '${upstream#refs/heads/}'"
274 echo "from the remote, but no such ref was fetched."
61e6108 @moy git-pull.sh: better warning message for "git pull" on detached head.
moy authored
275 fi
441ed41 @gitster "git pull --tags": error out with a better message.
gitster authored
276 exit 1
277 }
278
c85c792 @dscho pull --rebase: be cleverer with rebased upstream branches
dscho authored
279 test true = "$rebase" && {
19a7fcb @peff allow pull --rebase on branch yet to be born
peff authored
280 if ! git rev-parse -q --verify HEAD >/dev/null
281 then
282 # On an unborn branch
c697b57 @pclouds *.sh: respect $GIT_INDEX_FILE
pclouds authored
283 if test -f "$(git rev-parse --git-path index)"
19a7fcb @peff allow pull --rebase on branch yet to be born
peff authored
284 then
85af5f8 @avar i18n: git-pull die messages
avar authored
285 die "$(gettext "updating an unborn branch with changes added to the index")"
19a7fcb @peff allow pull --rebase on branch yet to be born
peff authored
286 fi
287 else
92c62a3 @artagnon Porcelain scripts: Rewrite cryptic "needs update" error message
artagnon authored
288 require_clean_work_tree "pull with rebase" "Please commit or stash them."
19a7fcb @peff allow pull --rebase on branch yet to be born
peff authored
289 fi
d44e712 pull: support rebased upstream + fetch + pull --rebase
Santi Béjar authored
290 oldremoteref= &&
e980765 @phord git-pull: Avoid merge-base on detached head
phord authored
291 test -n "$curr_branch" &&
c85c792 @dscho pull --rebase: be cleverer with rebased upstream branches
dscho authored
292 . git-parse-remote &&
d44e712 pull: support rebased upstream + fetch + pull --rebase
Santi Béjar authored
293 remoteref="$(get_remote_merge_branch "$@" 2>/dev/null)" &&
ffc2b48 @johnkeeping pull: suppress error when no remoteref is found
johnkeeping authored
294 oldremoteref=$(git merge-base --fork-point "$remoteref" $curr_branch 2>/dev/null)
c85c792 @dscho pull --rebase: be cleverer with rebased upstream branches
dscho authored
295 }
2d17985 pull: use git rev-parse -q
Miklos Vajna authored
296 orig_head=$(git rev-parse -q --verify HEAD)
eb2a8d9 @pyokagan pull: handle git-fetch's options as well
pyokagan authored
297 git fetch $verbosity $progress $dry_run $recurse_submodules $all $append \
298 $upload_pack $force $tags $prune $keep $depth $unshallow $update_shallow \
299 $refmap --update-head-ok "$@" || exit 1
29609e6 @peff pull: do nothing on --dry-run
peff authored
300 test -z "$dry_run" || exit 0
b10ac50 Fix pulling into the same branch.
Junio C Hamano authored
301
2d17985 pull: use git rev-parse -q
Miklos Vajna authored
302 curr_head=$(git rev-parse -q --verify HEAD)
b0ad11e @gitster pull: allow "git pull origin $something:$current_branch" into an unbo…
gitster authored
303 if test -n "$orig_head" && test "$curr_head" != "$orig_head"
b10ac50 Fix pulling into the same branch.
Junio C Hamano authored
304 then
305 # The fetch involved updating the current branch.
306
307 # The working tree and the index file is still based on the
308 # $orig_head commit, but we are merging into $curr_head.
309 # First update the working tree to match $curr_head.
310
c2b1a95 @jonseymour pull: take advantage of eval_gettextln
jonseymour authored
311 eval_gettextln "Warning: fetch updated the current branch head.
3320a97 @avar i18n: git-pull eval_gettext + warning message
avar authored
312 Warning: fast-forwarding your working tree from
c2b1a95 @jonseymour pull: take advantage of eval_gettextln
jonseymour authored
313 Warning: commit \$orig_head." >&2
7bd93c1 Convert to use quiet option when available
Dan Loewenherz authored
314 git update-index -q --refresh
5be6007 @gitster Rewrite "git-frotz" to "git frotz"
gitster authored
315 git read-tree -u -m "$orig_head" "$curr_head" ||
9f35aaa @avar i18n: git-pull eval_gettext + die message
avar authored
316 die "$(eval_gettext "Cannot fast-forward your working tree.
8323124 git-pull: reword "impossible to fast-forward" message.
Junio C Hamano authored
317 After making sure that you saved anything precious from
9f35aaa @avar i18n: git-pull eval_gettext + die message
avar authored
318 $ git diff \$orig_head
8323124 git-pull: reword "impossible to fast-forward" message.
Junio C Hamano authored
319 output, run
320 $ git reset --hard
9f35aaa @avar i18n: git-pull eval_gettext + die message
avar authored
321 to recover.")"
8323124 git-pull: reword "impossible to fast-forward" message.
Junio C Hamano authored
322
b10ac50 Fix pulling into the same branch.
Junio C Hamano authored
323 fi
324
05dd8e2 Fix default pull not to do an unintended Octopus.
Junio C Hamano authored
325 merge_head=$(sed -e '/ not-for-merge /d' \
326 -e 's/ .*//' "$GIT_DIR"/FETCH_HEAD | \
327 tr '\012' ' ')
e0bfc81 [PATCH] Retire git-parse-remote.
Junio C Hamano authored
328
329 case "$merge_head" in
521003f [PATCH] Use git-octopus when pulling more than one heads.
Junio C Hamano authored
330 '')
4973aa2 @gitster git-pull: dead code removal
gitster authored
331 error_on_no_merge_candidates "$@"
521003f [PATCH] Use git-octopus when pulling more than one heads.
Junio C Hamano authored
332 ;;
60fb5b2 Use git-merge in git-pull (second try).
Junio C Hamano authored
333 ?*' '?*)
d09e79c git-pull: allow pulling into an empty repository
Linus Torvalds authored
334 if test -z "$orig_head"
335 then
85af5f8 @avar i18n: git-pull die messages
avar authored
336 die "$(gettext "Cannot merge multiple branches into empty head")"
d09e79c git-pull: allow pulling into an empty repository
Linus Torvalds authored
337 fi
51b2ead @jaysoffian disallow providing multiple upstream branches to rebase, pull --rebase
jaysoffian authored
338 if test true = "$rebase"
339 then
85af5f8 @avar i18n: git-pull die messages
avar authored
340 die "$(gettext "Cannot rebase onto multiple branches")"
51b2ead @jaysoffian disallow providing multiple upstream branches to rebase, pull --rebase
jaysoffian authored
341 fi
60fb5b2 Use git-merge in git-pull (second try).
Junio C Hamano authored
342 ;;
343 esac
344
b4dc085 pull: merge into unborn by fast-forwarding from empty tree
Thomas Rast authored
345 # Pulling into unborn branch: a shorthand for branching off
346 # FETCH_HEAD, for lazy typers.
d09e79c git-pull: allow pulling into an empty repository
Linus Torvalds authored
347 if test -z "$orig_head"
348 then
b4dc085 pull: merge into unborn by fast-forwarding from empty tree
Thomas Rast authored
349 # Two-way merge: we claim the index is based on an empty tree,
350 # and try to fast-forward to HEAD. This ensures we will not
351 # lose index/worktree changes that the user already made on
352 # the unborn branch.
353 empty_tree=4b825dc642cb6eb9a060e54bf8d69288fbee4904
354 git read-tree -m -u $empty_tree $merge_head &&
9f48f2b @peff pull: update unborn branch tip after index
peff authored
355 git update-ref -m "initial pull" HEAD $merge_head "$curr_head"
d09e79c git-pull: allow pulling into an empty repository
Linus Torvalds authored
356 exit
357 fi
358
cf65426 @newren pull --rebase: Avoid spurious conflicts and reapplying unnecessary pa…
newren authored
359 if test true = "$rebase"
360 then
361 o=$(git show-branch --merge-base $curr_branch $merge_head $oldremoteref)
362 if test "$oldremoteref" = "$o"
363 then
364 unset oldremoteref
365 fi
366 fi
367
14e5d40 @gitster pull: Fix parsing of -X<option>
gitster authored
368 case "$rebase" in
369 true)
66713ef @stephenh pull: allow pull to preserve merges when rebasing
stephenh authored
370 eval="git-rebase $diffstat $strategy_args $merge_args $rebase_args $verbosity"
ea230d8 @bk2204 pull: add the --gpg-sign option.
bk2204 authored
371 eval="$eval $gpg_sign_args"
14e5d40 @gitster pull: Fix parsing of -X<option>
gitster authored
372 eval="$eval --onto $merge_head ${oldremoteref:-$merge_head}"
373 ;;
374 *)
efed002 merge/pull: verify GPG signatures of commits being merged
Sebastian Götte authored
375 eval="git-merge $diffstat $no_commit $verify_signatures $edit $squash $no_ff $ff_only"
ea230d8 @bk2204 pull: add the --gpg-sign option.
bk2204 authored
376 eval="$eval $log_arg $strategy_args $merge_args $verbosity $progress"
377 eval="$eval $gpg_sign_args"
d45366e @gitster merge: deprecate 'git merge <message> HEAD <commit>' syntax
gitster authored
378 eval="$eval FETCH_HEAD"
14e5d40 @gitster pull: Fix parsing of -X<option>
gitster authored
379 ;;
380 esac
381 eval "exec $eval"
Something went wrong with that request. Please try again.