diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2024-12-06 00:59:20 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2024-12-06 01:01:19 +0100 |
commit | cca2ef12eec44b5b2140761baf13e2a611a654f3 (patch) | |
tree | 409a88ba0a285b0f7d0903e7817b7f973f5a8789 /org.eclipse.jgit/src/org/eclipse/jgit/merge | |
parent | 6f8a48134cae23ac380f6704a46ceebac64d7f12 (diff) | |
parent | b3da1fbab93d63a594b6c743f9a7c98ecc768022 (diff) | |
download | jgit-cca2ef12eec44b5b2140761baf13e2a611a654f3.tar.gz jgit-cca2ef12eec44b5b2140761baf13e2a611a654f3.zip |
Merge branch 'stable-7.0' into stable-7.1
* stable-7.0:
FileSnapshot: silence "Not a Directory" exceptions
FileSnapshot: refactor to share error handling
Mark Attribute#getValue as @Nullable
Fix potential NPE in ResolveMerger#getAttributesContentMergeStrategy
Fix NPE in DiffFormatter#getDiffDriver
Pack: ensure packfile is still valid while still recoverable
WindowCache: add bulk purge(), call from bulk sites
UploadPack#implies: add missing @since tag
Disable MergeToolTest#testEmptyToolName
Change-Id: Icb25fed5b703c6a39a64231fd8ca93c1f1a581be
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/merge')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java index 033f28031a..dc96f65b87 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java @@ -1520,9 +1520,12 @@ public class ResolveMerger extends ThreeWayMerger { private ContentMergeStrategy getAttributesContentMergeStrategy( Attributes attributes, ContentMergeStrategy strategy) { Attribute attr = attributes.get(Constants.ATTR_MERGE); - if (attr != null && attr.getValue() - .equals(Constants.ATTR_BUILTIN_UNION_MERGE_DRIVER)) { - return ContentMergeStrategy.UNION; + if (attr != null) { + String attrValue = attr.getValue(); + if (attrValue != null && attrValue + .equals(Constants.ATTR_BUILTIN_UNION_MERGE_DRIVER)) { + return ContentMergeStrategy.UNION; + } } return strategy; } |