简体   繁体   中英

`-X patience` vs `-X diff-algorithm=patience` with `git merge-recursive`

What is the difference between git merge -s recursive -X patience other-branch git merge -s recursive -X diff-algorithm=patience other-branch

Also do either of git merge -s recursive -X patience -X diff-algorithm=patience other-branch git merge -s recursive -X patience -X diff-algorithm=histogram other-branch mean anything. If so, what?

What is the difference between

 git merge -s recursive -X patience other-branch git merge -s recursive -X diff-algorithm=patience other-branch 

None. -X patience is an old name for -X diff-algorithm=patience , dating back to when there was only one alternative. You can, currently, spell the histogram algorithm with -X histogram as well. The only one requiring -X diff-algorithm= is minimal .

Also do either of

 git merge -s recursive -X patience -X diff-algorithm=patience other-branch git merge -s recursive -X patience -X diff-algorithm=histogram other-branch 

mean anything. If so, what?

The last algorithm chosen on the command line overrides any previous ones on the command line, so these both have the effect of ignoring the first -X option.

(Note that -s recursive is the default strategy for merge when merging two commits, so this is redundant as well. It doesn't hurt , it just makes no difference.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM