2

-3 オプションで git apply を使用できない理由:

$ git apply --3way /tmp/0001-my-patch.patch
error: patch failed: a.h:9
Falling back to three-way merge...
Applied patch to 'a.h' cleanly.
error: patch failed: b.c:6
Falling back to three-way merge...
Applied patch to 'b.c' cleanly.
error: patch failed: drivers/Kconfig:1882
Falling back to three-way merge...
Applied patch to 'drivers/Kconfig' with conflicts.
U drivers/Kconfig
4

2 に答える 2

0

diffmergeこれは、 mergetool [ここから取得]として構成する方法です。

git config --global merge.tool diffmerge

git config --global mergetool.diffmerge.cmd "diffmerge --merge
--result=\$MERGED \$LOCAL \$BASE \$REMOTE"

git config --global mergetool.diffmerge.trustExitCode true
于 2014-07-26T22:46:15.313 に答える
0

のドキュメントからgit apply

--3way
パッチがきれいに適用されない場合は、3-way マージにフォールバックします

パッチがきれいに適用される場合、3way は無視されるようです。

于 2013-04-19T20:33:29.527 に答える