diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2021-04-12 23:50:54 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2021-04-19 01:52:19 +0200 |
commit | 8210f29fe43ccd35e7d2ed3ed45a84a75b2717c4 (patch) | |
tree | e226ef95a4bd159017444cda259d7437374c3759 /org.eclipse.jgit.pgm/pom.xml | |
parent | 983c25064edeada19bd46aa604a9b90e23778a90 (diff) | |
download | jgit-8210f29fe43ccd35e7d2ed3ed45a84a75b2717c4.tar.gz jgit-8210f29fe43ccd35e7d2ed3ed45a84a75b2717c4.zip |
Implement ours/theirs content conflict resolution
Git has different conflict resolution strategies:
* There is a tree merge strategy "ours" which just ignores any changes
from theirs ("-s ours"). JGit also has the mirror strategy "theirs"
ignoring any changes from "ours". (This doesn't exist in C git.)
Adapt StashApplyCommand and CherrypickCommand to be able to use those
tree merge strategies.
* For the resolve/recursive tree merge strategies, there are content
conflict resolution strategies "ours" and "theirs", which resolve
any conflict hunks by taking the "ours" or "theirs" hunk. In C git
those correspond to "-Xours" or -Xtheirs". Implement that in
MergeAlgorithm, and add API to set and pass through such a strategy
for resolving content conflicts.
* The "ours/theirs" content conflict resolution strategies also apply
for binary files. Handle these cases in ResolveMerger.
Note that the content conflict resolution strategies ("-X ours/theirs")
do _not_ apply to modify/delete or delete/modify conflicts. Such
conflicts are always reported as conflicts by C git. They do apply,
however, if one side completely clears a file's content.
Bug: 501111
Change-Id: I2c9c170c61c440a2ab9c387991e7a0c3ab960e07
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.pgm/pom.xml')
0 files changed, 0 insertions, 0 deletions