From 773d10e81952c00ecff1738ccc8124262242fd2d Mon Sep 17 00:00:00 2001 From: Dustin Jones Date: Thu, 25 Sep 2025 08:25:19 -0400 Subject: [PATCH] Add support for ZDiff3 conflict resolution strategy in merge operations (#1976) --- LibGit2Sharp.Tests/MergeFixture.cs | 48 ++++++++++++++++++ .../Resources/mergeconflict_testrepo_wd/a.txt | 7 +++ .../mergeconflict_testrepo_wd/dot_git/HEAD | 1 + .../mergeconflict_testrepo_wd/dot_git/config | 6 +++ .../mergeconflict_testrepo_wd/dot_git/index | Bin 0 -> 137 bytes .../dot_git/info/refs | 3 ++ .../dot_git/objects/info/commit-graph | Bin 0 -> 1352 bytes .../dot_git/objects/info/packs | 3 ++ ...d168964fc34fdc1e4a50ae098e21799dd906a4.idx | Bin 0 -> 1464 bytes ...168964fc34fdc1e4a50ae098e21799dd906a4.pack | Bin 0 -> 1172 bytes ...d168964fc34fdc1e4a50ae098e21799dd906a4.rev | Bin 0 -> 108 bytes ...a8f8acf571abc3f715ea91223671d542aacb6c.idx | Bin 0 -> 1268 bytes ...8acf571abc3f715ea91223671d542aacb6c.mtimes | Bin 0 -> 80 bytes ...8f8acf571abc3f715ea91223671d542aacb6c.pack | Bin 0 -> 636 bytes ...a8f8acf571abc3f715ea91223671d542aacb6c.rev | Bin 0 -> 80 bytes .../dot_git/packed-refs | 4 ++ LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs | 7 +++ LibGit2Sharp/CheckoutFileConflictStrategy.cs | 7 ++- LibGit2Sharp/Core/GitCheckoutOpts.cs | 5 ++ LibGit2Sharp/Core/GitCheckoutOptsWrapper.cs | 4 ++ LibGit2Sharp/Core/GitMergeOpts.cs | 5 ++ 21 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/a.txt create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/HEAD create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/config create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/index create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/info/refs create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/info/commit-graph create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/info/packs create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-5fd168964fc34fdc1e4a50ae098e21799dd906a4.idx create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-5fd168964fc34fdc1e4a50ae098e21799dd906a4.pack create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-5fd168964fc34fdc1e4a50ae098e21799dd906a4.rev create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-9ea8f8acf571abc3f715ea91223671d542aacb6c.idx create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-9ea8f8acf571abc3f715ea91223671d542aacb6c.mtimes create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-9ea8f8acf571abc3f715ea91223671d542aacb6c.pack create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-9ea8f8acf571abc3f715ea91223671d542aacb6c.rev create mode 100644 LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/packed-refs diff --git a/LibGit2Sharp.Tests/MergeFixture.cs b/LibGit2Sharp.Tests/MergeFixture.cs index 7b1fda718..484128a25 100644 --- a/LibGit2Sharp.Tests/MergeFixture.cs +++ b/LibGit2Sharp.Tests/MergeFixture.cs @@ -669,6 +669,54 @@ public void CanSpecifyConflictFileStrategy(CheckoutFileConflictStrategy conflict } } + [Theory] + [InlineData(CheckoutFileConflictStrategy.Merge)] + [InlineData(CheckoutFileConflictStrategy.Diff3)] + [InlineData(CheckoutFileConflictStrategy.ZDiff3)] + public void CanSpecifyMergeConflictFileStrategy(CheckoutFileConflictStrategy conflictStrategy) + { + const string conflictFile = "a.txt"; + const string expectedFileFormat = "a.{0}.txt"; + const string conflictBranchName = "conflicts"; + const string resultsBranchName = "results"; + + string expectedFileName = string.Format(expectedFileFormat, conflictStrategy.ToString().ToLower()); + string path = SandboxMergeConflictTestRepo(); + + using (var repo = new Repository(path)) + { + Branch branch = repo.Branches[conflictBranchName]; + Assert.NotNull(branch); + + // Ensure the working directory is clean before merging + repo.Reset(ResetMode.Hard); + repo.RemoveUntrackedFiles(); + + MergeOptions mergeOptions = new MergeOptions() + { + FileConflictStrategy = conflictStrategy + }; + + MergeResult result = repo.Merge(branch, Constants.Signature, mergeOptions); + Assert.Equal(MergeStatus.Conflicts, result.Status); + + // Get the information on the conflict. + Conflict conflict = repo.Index.Conflicts[conflictFile]; + + Assert.NotNull(conflict); + Assert.NotNull(conflict.Theirs); + Assert.NotNull(conflict.Ours); + + Commit expectedCommit = repo.Branches[resultsBranchName].Tip; + Blob expectedBlob = (Blob)expectedCommit[expectedFileName].Target; + string expectedContent = expectedBlob.GetContentText(new FilteringOptions(expectedFileName)); + + // Verify the content of the file on disk contains conflict markers. + string fileContent = File.ReadAllText(Path.Combine(repo.Info.WorkingDirectory, conflictFile)); + Assert.Equal(expectedContent, fileContent); + } + } + [Theory] [InlineData(MergeFileFavor.Ours)] [InlineData(MergeFileFavor.Theirs)] diff --git a/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/a.txt b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/a.txt new file mode 100644 index 000000000..ac92cd6c0 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/a.txt @@ -0,0 +1,7 @@ +A +B +C +D +E +F +G \ No newline at end of file diff --git a/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/HEAD b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/HEAD new file mode 100644 index 000000000..b870d8262 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/main diff --git a/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/config b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/config new file mode 100644 index 000000000..8ad0b1bad --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/config @@ -0,0 +1,6 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + ignorecase = true diff --git a/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/index b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/index new file mode 100644 index 0000000000000000000000000000000000000000..36023028ea44dac55a803870cf755e064745ddd0 GIT binary patch literal 137 zcmZ?q402{*U|<4b#*C{P-xb!Sx@26{R^!Ut^#v#f1&vE!EFjIhX42Ulj%$1+4c%LM z9!z=QX3cY1vsk$D=?4doFB%Kf Ydds{+8IETh&!4;FO6puc;aif&0D(^~0RR91 literal 0 HcmV?d00001 diff --git a/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/info/refs b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/info/refs new file mode 100644 index 000000000..c02e5d754 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/info/refs @@ -0,0 +1,3 @@ +cd4b13da8859445f4357c1e24d92b483ffe2dc85 refs/heads/conflicts +0076e9fe99d1c2df56cd939a897db42d714b088b refs/heads/main +139641856b0ef7941f583972614c1df9bb26939b refs/heads/results diff --git a/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/info/commit-graph b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/info/commit-graph new file mode 100644 index 0000000000000000000000000000000000000000..f561a08154f6a93a4327cff19f7154b32279cbb2 GIT binary patch literal 1352 zcmZ>E5Aa}QWMT04ba7*V02d(J2f}1=advSGfwHH#yEqy_*sLlL8bq?100~AaVkV$j zqj)q7hI<-d2B!0&f?0rW#f{5e{+oI6(EYHplV^3-ZqY6D=I9ol=GdCe_kD_dgk@2p zkL=IgYLjQ5^%lO>5$O`|9DeYT@1!lw{~z6H{jnqY(W~j|0gpp%*4*=Af36!^d9~2Z zxA5(+S@T@hEEcYO`oY2Di^c*_SQP*XAmGTjs>QI+J9AfW7Gg{r8x$o4Qy9-}>mp{2%=;mAa_SdX=E^8JGS3dpV z;PFLcLG|3Pk-A|~E!ShWKHsCU@zuW|E7Ka`^wNbZ91=KI*CtgQd)loU5x1(N?W2xJ z49DA=8qdY~xg0TvRl9g5>v3-06ZNloiddt!IULvcN*cPi^gNjI zdhhDxr;qOQ&fL`-`7-t8iCei*r_5DWZ~pq@5bso__T!Tjw&n?C?-gBfpkqzap0nP< zw>lzS;+?|}KJuNkrTPD(JFRbyoJdG`AGiN6uo0dJe>2%$VkX*#C~4SHL>XKE=wpH`$gvl9;z3aN(_>u-xU_R_(dwIQPh}9{}%K B)*%1@ literal 0 HcmV?d00001 diff --git a/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-5fd168964fc34fdc1e4a50ae098e21799dd906a4.pack b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-5fd168964fc34fdc1e4a50ae098e21799dd906a4.pack new file mode 100644 index 0000000000000000000000000000000000000000..1cf4cb9ea874dfa91bdb749a61125d3b74fd91d9 GIT binary patch literal 1172 zcmWG=boORoU|<4bz8U-#bEfuquRCPG!|>g*RsTc4t!K&J{v0Y{ca%D1H5Tz|z5Dw! zuHkA%n&GYv2eIkQPg~x2YE&$2n#1%vof8)Cq^E;CDF1sv{o)$Blz2((T-GYesR_6+GHs5(T|Nge$4?bnhzO+oYoun5 zt$J5|y1k%ZVjuJ7^fu3FlN~aP_x8CiTw4`=)rR4$g5Rc@K!?ulvE~Ch)ZzP_L*fiO zGi7%RIq~?skvZTS6UgFub=mjl<;=^Le{TyHH-2zqOXJKffiDddy7=ZarFS0mVDnc= zS(SI~Xi;k*8|T`}%kyl7qr9)U^`5kHHT%}t@!Q33dzCi#ob6lvB=uBpbG3ijdYS*b z|Lx#h6D<#Q*8HBVBUW@EQ3B3wf3?8j$uo1=X5-?26* zSIqf+@<(gn_9Ysop$G3=IC4hi=p6%7Ro#n57mcnSQ8Bcrm8LwQit)FehoZ=@%kBXiZJuG@!^tgzffv=WHav@X2 z9Ags$17pKLk1N_MH4-C?U*_-~H{Ca>?VYYI|FS*zc31s;xtQUU1%LcaBkNpc}K)r|bRJ8Zlmpi_AFJ7i3wzfuSy=6TzFBkq_jPe~zcgYTMGx&W@#a3af4}6~ymNQT zU!A?%s=xR2{5z}+IooY}cCuB>Q9W(V)nFjNdf?yOq=VTj1bqM8ad@lJDR6@Q(KNZZ z!sYUA(jSQ^(;qKyk=6dCN(HsxD9&|nFdbFvTq4mk1JzM6Sc`_+Uk0DW# zw`nWLL8rXA8WcoWFZ_%>+Pp2WacON?z*#3=7W)PHHy&}{laz1eG&bR>a-1C~#T~Y% z>6?tj9k7F};0`k5VPf}-kvRJQvvBj%HvX~}ne!M?Gh@y1ot6Gq_CM21>gCFwx$TU7 zQPyEoh8^E|x7Z^)9qd#l2H~|#3o*=CG4Ho&kh#vPr&VvRJ+C$~+xJU6C6$Ze_**`a zos2L;g2D=XJOfXh)%OZL;i;?XsjKyjiNRl;-7x-Q#x(!K{&(cO0@iW%DOS$C$+iRl DkG>?) literal 0 HcmV?d00001 diff --git a/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-5fd168964fc34fdc1e4a50ae098e21799dd906a4.rev b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-5fd168964fc34fdc1e4a50ae098e21799dd906a4.rev new file mode 100644 index 0000000000000000000000000000000000000000..e640dbcea11a503d576bc3b00d7463e48888e91f GIT binary patch literal 108 zcmWIYbctYKU|>YT+(0%6@B%Rh5HkZYClIp%F&7Xs0Wm8OvjZ^?5VOQz%$VkX*#C~4 lSHL>XKE=wpH`$gvStZk9>pzQu`@Y&U{y&zffzPg+000sr6Yu~4 literal 0 HcmV?d00001 diff --git a/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-9ea8f8acf571abc3f715ea91223671d542aacb6c.idx b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-9ea8f8acf571abc3f715ea91223671d542aacb6c.idx new file mode 100644 index 0000000000000000000000000000000000000000..7187050569104d26a9a829e7260c20f1b61b2f24 GIT binary patch literal 1268 zcmexg;-AdGz`z8=!woP3Jwz)E3a^30%s~6`VHTkLV8^ULH_{rj0qq#Ym|?&U3>Oq^ z($dk@(Y0#D;qKK5x(g2NEZC&I&3o>_UynEQ1^v7eFJFB5hr`)x4^p#d{+b?EzO{A% z^L~RP(p$nG@my;uR=M8lIHTBg0@tN?@zRCH_8j%wc?aEP(HZqpDqBmu!Jekjwm< z|4s~_E>7{!nz?s!CST3Q7!xb^ML>7+0I>xS_XD%H2oO5}@iSm{w3)Z!$C|H&s}Fw{ keKk?ZtnjMSs?#}UsVcSm41#w4d3HT|sy1iGgNNIE03gM6DgXcg literal 0 HcmV?d00001 diff --git a/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-9ea8f8acf571abc3f715ea91223671d542aacb6c.mtimes b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-9ea8f8acf571abc3f715ea91223671d542aacb6c.mtimes new file mode 100644 index 0000000000000000000000000000000000000000..8717541c18d06c17c34faa25479f64bab987950b GIT binary patch literal 80 zcmeYb@pWZjU|N?t7SldtK5KTopvzR=Vc%89q1 z%fPU8EpP26wu(8$Pl_HDJ=@gCz{(%)F0Lo87p`ZnSH4b)Bfw*`$0h?~zo$WA1wNjE zC(i17g`V)#)%4WWdbX*RVZ$_zbsp<9^sIpj&z<)^ebPry^BEJv@leVC%Q=yp;C<4^ z+xQyDAs^;df4KhmY>lJ+`y;2t*DHuX~Z~+9@@9|PokjO{Sf9; z{`;z?;qu>q~)d?v_R&L>3E${WQvE+!BVdeJ| zv)8e8h)kVrbUMI2Q!(seXK~V`NA3#`iurnS@-rc|MvN1 zYifTsG&*^8X!;a5^uM@QI`iz8`^@EHjjr4ETW?)2o4?xe{@abSs~L|7_}1=Yg~e9U z!=k6~7$YjS)?tmTj4zT&80p30h;``7zdux3*H${+tac5Tc@Z&r3p>NsKAw;BR{U7= VwQ%*}@1n0JDw!2tby{^g2LM}FCBpy! literal 0 HcmV?d00001 diff --git a/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-9ea8f8acf571abc3f715ea91223671d542aacb6c.rev b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/objects/pack/pack-9ea8f8acf571abc3f715ea91223671d542aacb6c.rev new file mode 100644 index 0000000000000000000000000000000000000000..fa4458d12bce6a9aca32895be2f3d1e6755e6127 GIT binary patch literal 80 zcmWIYbctYKU|@t|AO&VK0cmC+W&vVWAZDAl;>Vh=g{u#L7kxER$*l0I)2h=s0gIyf VU(dVivC(3;{;+7T*8> literal 0 HcmV?d00001 diff --git a/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/packed-refs b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/packed-refs new file mode 100644 index 000000000..2848696a9 --- /dev/null +++ b/LibGit2Sharp.Tests/Resources/mergeconflict_testrepo_wd/dot_git/packed-refs @@ -0,0 +1,4 @@ +# pack-refs with: peeled fully-peeled sorted +cd4b13da8859445f4357c1e24d92b483ffe2dc85 refs/heads/conflicts +0076e9fe99d1c2df56cd939a897db42d714b088b refs/heads/main +139641856b0ef7941f583972614c1df9bb26939b refs/heads/results diff --git a/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs b/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs index e9429d562..1f24f4f98 100644 --- a/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs +++ b/LibGit2Sharp.Tests/TestHelpers/BaseFixture.cs @@ -36,6 +36,7 @@ static BaseFixture() public static string ShallowTestRepoPath { get; private set; } public static string MergedTestRepoWorkingDirPath { get; private set; } public static string MergeTestRepoWorkingDirPath { get; private set; } + public static string MergeConflictTestRepoWorkingDirPath { get; private set; } public static string MergeRenamesTestRepoWorkingDirPath { get; private set; } public static string RevertTestRepoWorkingDirPath { get; private set; } public static string SubmoduleTestRepoWorkingDirPath { get; private set; } @@ -81,6 +82,7 @@ private static void SetUpTestEnvironment() MergedTestRepoWorkingDirPath = Path.Combine(ResourcesDirectory.FullName, "mergedrepo_wd"); MergeRenamesTestRepoWorkingDirPath = Path.Combine(ResourcesDirectory.FullName, "mergerenames_wd"); MergeTestRepoWorkingDirPath = Path.Combine(ResourcesDirectory.FullName, "merge_testrepo_wd"); + MergeConflictTestRepoWorkingDirPath = Path.Combine(ResourcesDirectory.FullName, "mergeconflict_testrepo_wd"); RevertTestRepoWorkingDirPath = Path.Combine(ResourcesDirectory.FullName, "revert_testrepo_wd"); SubmoduleTestRepoWorkingDirPath = Path.Combine(ResourcesDirectory.FullName, "submodule_wd"); SubmoduleTargetTestRepoWorkingDirPath = Path.Combine(ResourcesDirectory.FullName, "submodule_target_wd"); @@ -201,6 +203,11 @@ protected string SandboxMergeTestRepo() return Sandbox(MergeTestRepoWorkingDirPath); } + protected string SandboxMergeConflictTestRepo() + { + return Sandbox(MergeConflictTestRepoWorkingDirPath); + } + protected string SandboxRevertTestRepo() { return Sandbox(RevertTestRepoWorkingDirPath); diff --git a/LibGit2Sharp/CheckoutFileConflictStrategy.cs b/LibGit2Sharp/CheckoutFileConflictStrategy.cs index 9d53745e7..29726517a 100644 --- a/LibGit2Sharp/CheckoutFileConflictStrategy.cs +++ b/LibGit2Sharp/CheckoutFileConflictStrategy.cs @@ -33,6 +33,11 @@ public enum CheckoutFileConflictStrategy /// /// Write diff3 formated files for conflicts. /// - Diff3 + Diff3, + + /// + /// Write zdiff3 formated files for conflicts. + /// + ZDiff3 } } diff --git a/LibGit2Sharp/Core/GitCheckoutOpts.cs b/LibGit2Sharp/Core/GitCheckoutOpts.cs index 053258565..56592e612 100644 --- a/LibGit2Sharp/Core/GitCheckoutOpts.cs +++ b/LibGit2Sharp/Core/GitCheckoutOpts.cs @@ -105,6 +105,11 @@ internal enum CheckoutStrategy /// GIT_CHECKOUT_DONT_WRITE_INDEX = (1 << 23), + /// + /// Include common ancestor data in zdiff3 format for conflicts + /// + GIT_CHECKOUT_CONFLICT_STYLE_ZDIFF3 = (1 << 25), + // THE FOLLOWING OPTIONS ARE NOT YET IMPLEMENTED /// diff --git a/LibGit2Sharp/Core/GitCheckoutOptsWrapper.cs b/LibGit2Sharp/Core/GitCheckoutOptsWrapper.cs index 0fba82754..56adcb243 100644 --- a/LibGit2Sharp/Core/GitCheckoutOptsWrapper.cs +++ b/LibGit2Sharp/Core/GitCheckoutOptsWrapper.cs @@ -78,6 +78,10 @@ internal static CheckoutStrategy CheckoutStrategyFromFileConflictStrategy(Checko case CheckoutFileConflictStrategy.Diff3: flags = CheckoutStrategy.GIT_CHECKOUT_CONFLICT_STYLE_DIFF3; break; + + case CheckoutFileConflictStrategy.ZDiff3: + flags = CheckoutStrategy.GIT_CHECKOUT_CONFLICT_STYLE_ZDIFF3; + break; } return flags; diff --git a/LibGit2Sharp/Core/GitMergeOpts.cs b/LibGit2Sharp/Core/GitMergeOpts.cs index 48675a2d0..5f823e133 100644 --- a/LibGit2Sharp/Core/GitMergeOpts.cs +++ b/LibGit2Sharp/Core/GitMergeOpts.cs @@ -194,5 +194,10 @@ internal enum GitMergeFileFlag /// Take extra time to find minimal diff /// GIT_MERGE_FILE_DIFF_MINIMAL = (1 << 7), + + /// + /// Create zdiff3 ("zealous diff3")-style files + /// + GIT_MERGE_FILE_STYLE_ZDIFF3 = (1 << 8), } }