]> source.dussan.org Git - jgit.git/log
jgit.git
2 years agoWorkTreeUpdater: remove safeWrite option 45/195445/3
Han-Wen Nienhuys [Thu, 25 Aug 2022 17:37:35 +0000 (19:37 +0200)]
WorkTreeUpdater: remove safeWrite option

This was added in Ideaefd5178 to anticipate on writing files for
ApplyCommand, but we are keeping WorkTreeUpdater private to the merge
package for now.

Change-Id: Ifa79dac245e60eb7a77eaea4cc1249222e347d38

2 years agoApplyCommand: fix ApplyResult#updatedFiles 31/195131/5
Han-Wen Nienhuys [Wed, 10 Aug 2022 15:46:12 +0000 (17:46 +0200)]
ApplyCommand: fix ApplyResult#updatedFiles

On executing a copy, mark the destination as updated.

On executing a rename, mark both source and destination as updated.

Change-Id: Ied5b9b0e5a14eac59a06cdd0961e25e143f50ff0

2 years agoWorkTreeUpdater: rename metadata maps 26/195226/3
Han-Wen Nienhuys [Thu, 18 Aug 2022 16:13:54 +0000 (18:13 +0200)]
WorkTreeUpdater: rename metadata maps

Change-Id: I8ff3803da8fc13377d11c2dc5523e9e32d0650cb

2 years agoWorkTreeUpdater#Result: hide data members 25/195225/3
Han-Wen Nienhuys [Thu, 18 Aug 2022 16:10:47 +0000 (18:10 +0200)]
WorkTreeUpdater#Result: hide data members

This is the standard across JGit.

Change-Id: Ie52ad7000d8725657b33dd4f3adcc05ab9666875

2 years agoMerge "WorkTreeUpdater: re-format and clean-up"
Han-Wen NIenhuys [Thu, 18 Aug 2022 15:22:46 +0000 (11:22 -0400)]
Merge "WorkTreeUpdater: re-format and clean-up"

2 years agoAdd javadoc on RevCommit 81/195081/16
Ronald Bhuleskar [Fri, 5 Aug 2022 19:59:39 +0000 (12:59 -0700)]
Add javadoc on RevCommit

Change-Id: Ib413154fe52983286cb6307862a7373af4fec6e8

2 years agoOption to pass start RevCommit to be blamed on to the BlameGenerator. 82/195082/17
Ronald Bhuleskar [Fri, 5 Aug 2022 20:00:10 +0000 (13:00 -0700)]
Option to pass start RevCommit to be blamed on to the BlameGenerator.

This can allow passing a FilteredRevCommit which is the filtered list of
commit graph making it easier for Blame to work on. This can
significantly improve blame performance since blame can skip expensive
RevWalk.

Change-Id: Ie127cb710d004079e9f53a5802130afdb49a7de1

2 years agoWorkTreeUpdater: re-format and clean-up 82/195182/4
Thomas Wolf [Sun, 14 Aug 2022 15:47:36 +0000 (17:47 +0200)]
WorkTreeUpdater: re-format and clean-up

Reformat using the standard JGit formatter settings. Clean-ups:

* Try to improve javadoc.
* Remove blindly copy-pasted "@since 6.1" annotations.
* Get rid of private method nonNullNonBareRepo(); it's not needed.
* Simplify method nonNullRepo(), and annotate as @NonNull.
* Rename setInCoreFileSizeLimit() to getInCoreFileSizeLimit().

Change-Id: Ib1797e7cf925d87554307468330971e8ab2e05e9
Signed-off-by: Thomas Wolf <twolf@apache.org>
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2 years agoAdds FilteredRevCommit that can overwrites its parents in the DAG. 26/195026/21
Ronald Bhuleskar [Wed, 3 Aug 2022 23:41:43 +0000 (16:41 -0700)]
Adds FilteredRevCommit that can overwrites its parents in the DAG.

Change-Id: I1ea63a3b56074099688fc45d6a22943a8ae3c2ae

2 years agoMerge changes Ib6689f54,I3b5c22ee
Matthias Sohn [Tue, 16 Aug 2022 21:00:43 +0000 (17:00 -0400)]
Merge changes Ib6689f54,I3b5c22ee

* changes:
  Remove unused API problem filters
  Add missing @since tag for RevCommit#parents introduced in 61b4d105e4

2 years agoDirCacheCheckout: load WorkingTreeOptions only once 81/195181/2
Thomas Wolf [Sun, 14 Aug 2022 14:34:50 +0000 (16:34 +0200)]
DirCacheCheckout: load WorkingTreeOptions only once

Previous code loaded the WorkingTreeOptions afresh for every single
file being checked out. This checked the git config (all three files,
repo, user and system config) for having been modified every time.

These checks can be costly, for instance on Windows, or if one of the
three config files is not on a local disk, or on an otherwise slow
storage.

Improve this by loading the options and thus checking the git config
only once before the checkout.

Bug: 579715
Change-Id: I21cd5a808f9d90b5ca2d022f91f0eeb8ca26091c
Signed-off-by: Thomas Wolf <twolf@apache.org>
2 years agoWorkTreeUpdater: Fix unclosed streams 80/195180/2
Thomas Wolf [Sun, 14 Aug 2022 14:38:57 +0000 (16:38 +0200)]
WorkTreeUpdater: Fix unclosed streams

1. A TemporaryBuffer.LocalFile must be destroyed to ensure the
   temporary file gets deleted on disk.
2. TemporaryBuffer.openInputStream() may be used only after
   TemporaryBuffer.close().
3. The caller of DirCacheCheckout.getContent() is responsible for
   closing the OutputStream!

Change-Id: I46abb0fba27656a1026858e5783fc60d4738a45e
Signed-off-by: Thomas Wolf <twolf@apache.org>
2 years agoMerge "Fix API errors caused by 23a71696cd"
Matthias Sohn [Sun, 14 Aug 2022 09:43:39 +0000 (05:43 -0400)]
Merge "Fix API errors caused by 23a71696cd"

2 years agoFix adding symlinks to the index when core.symlinks=false 08/194808/2
Thomas Wolf [Wed, 20 Jul 2022 16:30:18 +0000 (18:30 +0200)]
Fix adding symlinks to the index when core.symlinks=false

With core.symlinks=false, symlinks are checked out as plain files.
When such a file is re-added to the index, and the index already
contains a symlink there, add the file as a symlink. Previous code
changed the index entry to a regular file.

Bug: 580412
Change-Id: I5497bedc3da89c8b10120b8077c56bc5b67cb791
Signed-off-by: Thomas Wolf <twolf@apache.org>
2 years agoRemove unused API problem filters 57/195157/1
Matthias Sohn [Fri, 12 Aug 2022 08:44:12 +0000 (10:44 +0200)]
Remove unused API problem filters

Change-Id: Ib6689f545585bd59b8fc06ca3a104080021424d6

2 years agoAdd missing @since tag for RevCommit#parents introduced in 61b4d105e4 56/195156/1
Matthias Sohn [Fri, 12 Aug 2022 08:38:57 +0000 (10:38 +0200)]
Add missing @since tag for RevCommit#parents introduced in 61b4d105e4

Change-Id: I3b5c22eea7d0af5464c7df7a7cd855ea08029853

2 years agoFix API errors caused by 23a71696cd 55/195155/2
Matthias Sohn [Fri, 12 Aug 2022 08:19:24 +0000 (10:19 +0200)]
Fix API errors caused by 23a71696cd

- add missing @since 6.3 for new protected field workTreeUpdater and new
  class WorkTreeUpdater
- suppress API errors caused by removing/adding protected fields and
  methods

We follow OSGi semantic versioning which allows breaking implementers in
minor versions which are e.g. subclassing a public class.

Change-Id: I28f0d7b4fdd9a1f0fbc6b137d6c68dda9fe3c11e

2 years agoMerge "Provide encoding to String#getBytes()"
Han-Wen NIenhuys [Tue, 9 Aug 2022 16:17:32 +0000 (12:17 -0400)]
Merge "Provide encoding to String#getBytes()"

2 years agoMerge changes Ideaefd51,I6c347393
Han-Wen NIenhuys [Tue, 9 Aug 2022 09:10:53 +0000 (05:10 -0400)]
Merge changes Ideaefd51,I6c347393

* changes:
  Reapply "Create util class for work tree updating in both filesystem and index."
  ResolveMerger: add coverage for inCore file => directory transition

2 years agoProvide default shallowCommits getter and setter in ObjectDatabase 85/195085/11
Ronald Bhuleskar [Sat, 6 Aug 2022 00:30:55 +0000 (17:30 -0700)]
Provide default shallowCommits getter and setter in ObjectDatabase

I649db9ae679ec2606cf7c530b040f8b6b93eb81a added a default implementation
for getShallowCommits and setShallowCommits to DfsObjDatabase, for the
convenience of any implementers that define subclasses. But we forgot
that some implementers inherit from ObjectDatabase directly instead.
Move the default getter and setter to the base class so that such
callers do not need source changes to unbreak their build.

This also lets us update the api_filters to reflect that this is no
longer an API-breaking change.

Change-Id: I5dcca462eb306e511e57907b7d9264d51b3f3014

2 years agoReapply "Create util class for work tree updating in both filesystem and index." 99/195099/5
Nitzan Gur-Furman [Mon, 8 Aug 2022 15:50:47 +0000 (17:50 +0200)]
Reapply "Create util class for work tree updating in both filesystem and index."

This reverts commit 5709317f71ccaf26eceaa896150f203879b634b8.

Add a bugfix for deletions in ResolveMergers instantiated with just an
ObjectInserter as argument.

Original change description:

Create util class for work tree updating in both filesystem and index.

This class intends to make future support in index updating easier.

This class currently extracts some logic from ResolveMerger. Logic
related to StreamSupplier was copied from ApplyCommand, which will be
integrated in a following change.

Co-authored-by: Nitzan Gur-Furman <nitzan@google.com>
Co-authored-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: Ideaefd51789a382a8b499d1ca7ae0146d032f48b

2 years agoResolveMerger: add coverage for inCore file => directory transition 05/195105/2
Han-Wen Nienhuys [Mon, 8 Aug 2022 15:49:14 +0000 (17:49 +0200)]
ResolveMerger: add coverage for inCore file => directory transition

Change-Id: I6c3473932eb418a036f5943c78e619184559ef3a

2 years agoProvide encoding to String#getBytes() 00/195100/1
Han-Wen Nienhuys [Mon, 8 Aug 2022 14:00:48 +0000 (16:00 +0200)]
Provide encoding to String#getBytes()

Fixes ErrorProne complaint.

Change-Id: I706b225f98187bf5f86999ed5342d0072e57e314

2 years agoRevert "Create util class for work tree updating in both filesystem and index." 58/194258/2
Jonathan Nieder [Fri, 5 Aug 2022 20:11:41 +0000 (16:11 -0400)]
Revert "Create util class for work tree updating in both filesystem and index."

This reverts commit 5151b324f4605b1091ac5843dcc1f04b3996f0d1. It is
producing NullPointerExceptions during merges, causing Gerrit's
acceptance tests to fail:

com.google.gerrit.extensions.restapi.RestApiException: Cannot rebase ps
[...]
at com.google.gerrit.server.api.changes.RevisionApiImpl.rebase(RevisionApiImpl.java:280)
at com.google.gerrit.acceptance.api.change.ChangeIT.rebaseChangeBase(ChangeIT.java:1584)
Caused by: com.google.gerrit.server.update.UpdateException: java.lang.NullPointerException: repository is required
at com.google.gerrit.server.update.BatchUpdate.executeUpdateRepo(BatchUpdate.java:588)
[...]
Caused by: java.lang.NullPointerException: repository is required
at org.eclipse.jgit.merge.Merger.nonNullRepo(Merger.java:128)
at org.eclipse.jgit.merge.ResolveMerger.addDeletion(ResolveMerger.java:380)
at org.eclipse.jgit.merge.ResolveMerger.processEntry(ResolveMerger.java:553)
at org.eclipse.jgit.merge.ResolveMerger.mergeTreeWalk(ResolveMerger.java:1224)
at org.eclipse.jgit.merge.ResolveMerger.mergeTrees(ResolveMerger.java:1174)
at org.eclipse.jgit.merge.ResolveMerger.mergeImpl(ResolveMerger.java:299)
at org.eclipse.jgit.merge.Merger.merge(Merger.java:233)
at org.eclipse.jgit.merge.Merger.merge(Merger.java:186)
at org.eclipse.jgit.merge.ThreeWayMerger.merge(ThreeWayMerger.java:96)
at com.google.gerrit.server.change.RebaseChangeOp.rebaseCommit(RebaseChangeOp.java:360)

Change-Id: Idf63de81666d0df118d2d93c4f6e014e00dc05b8

2 years agoProvide a default implementation for set/get shallowCommits on DfsObjDatabase 84/195084/2
Ronald Bhuleskar [Fri, 5 Aug 2022 21:23:17 +0000 (14:23 -0700)]
Provide a default implementation for set/get shallowCommits on DfsObjDatabase

Jgit change https://git.eclipse.org/r/c/jgit/jgit/+/193329 adds an implementation for get/set shallow commits in ObjectDatabase. This failed gerrit's acceptance tests since there is no default implementation for them in DfsObjDatabase.

Change-Id: I649db9ae679ec2606cf7c530b040f8b6b93eb81a

2 years agoMerge "Revert "Option to pass start RevCommit to be blamed on to the BlameGenerator.""
Terry Parker [Wed, 3 Aug 2022 22:38:05 +0000 (18:38 -0400)]
Merge "Revert "Option to pass start RevCommit to be blamed on to the BlameGenerator.""

2 years agoMerge "Revert "Adds FilteredRevCommit that can overwrites its parents in the DAG.""
Terry Parker [Wed, 3 Aug 2022 22:37:57 +0000 (18:37 -0400)]
Merge "Revert "Adds FilteredRevCommit that can overwrites its parents in the DAG.""

2 years agoRevert "Adds FilteredRevCommit that can overwrites its parents in the DAG." 57/194257/1
Ronald Bhuleskar [Wed, 3 Aug 2022 21:16:34 +0000 (17:16 -0400)]
Revert "Adds FilteredRevCommit that can overwrites its parents in the DAG."

This reverts commit ceb51a5e0e9db166e572ea7cd362795b4662b0cd.

Reason for revert: The change in https://git.eclipse.org/r/c/jgit/jgit/+/194354 broke the egit test [1]. Calling c.getShortMessage() causes an NPE.

[1] https://ci.eclipse.org/egit/job/egit.gerrit/2711/

Change-Id: I411565b6eaa0bbb562cc1c8a355942ff09fd29bc

2 years agoRevert "Option to pass start RevCommit to be blamed on to the BlameGenerator." 56/194256/1
Ronald Bhuleskar [Wed, 3 Aug 2022 21:14:18 +0000 (17:14 -0400)]
Revert "Option to pass start RevCommit to be blamed on to the BlameGenerator."

This reverts commit 59e8bec6e7705a89b5d0b9c6ac004b323ffa16b0.

Reason for revert: The change in https://git.eclipse.org/r/c/jgit/jgit/+/194354 broke the egit test [1]. Calling c.getShortMessage() causes an NPE.

[1] https://ci.eclipse.org/egit/job/egit.gerrit/2711/

Change-Id: Iaf5feb35f4bb4c3487b04be15d1fe11376975523

2 years agoCleanCommand: fix prefix matching 44/194944/3
Thomas Wolf [Fri, 29 Jul 2022 22:27:49 +0000 (00:27 +0200)]
CleanCommand: fix prefix matching

String.startsWith() is not a valid test for file path prefixes:
directory "a" is _not_ a prefix of a file "ab", only of "a/b".

Add a proper Paths.isEqualOrPrefix() method and use it in CleanCommand.

Bug: 580478
Change-Id: I6863e6ba94a8ffba6561835cc57044a0945d2770
Signed-off-by: Thomas Wolf <twolf@apache.org>
2 years agoOption to pass start RevCommit to be blamed on to the BlameGenerator. 98/194998/2
Ronald Bhuleskar [Wed, 3 Aug 2022 00:17:46 +0000 (17:17 -0700)]
Option to pass start RevCommit to be blamed on to the BlameGenerator.

This can allow passing a FilteredRevCommit which is the filtered list of
commit graph making it easier for Blame to work on. This can
significantly improve blame performance since blame can skip expensive
RevWalk.

Change-Id: I5dab25301d6aef7df6a0bc25a4c553c730199272

2 years agoAdds FilteredRevCommit that can overwrites its parents in the DAG. 54/194354/29
Ronald Bhuleskar [Wed, 3 Aug 2022 00:15:08 +0000 (17:15 -0700)]
Adds FilteredRevCommit that can overwrites its parents in the DAG.

Change-Id: I2df9843dde0f589f5fea6cedaaff52e313eea6de

2 years agoAdd the ability to override parents on RevCommit. 04/194204/26
Ronald Bhuleskar [Wed, 15 Jun 2022 21:37:21 +0000 (14:37 -0700)]
Add the ability to override parents on RevCommit.

This makes RevCommit extensible to allow having different structure of
child-parent relationship. This change is a pre-requsite for having a
FilteredRevCommit that overrides parents from the RevCommit. That then
provides a cheaper way to walk over a subset of RevCommits instead of
an expensive way that applies filters while walking over selected
commits. Useful with Blame which works on a single file and that can be
made performant, if we know all the commits needed by the Blame
algorithm. So Blame algorithm can avoid walking over finding what
commits to blame on.

This change makes parents field on RevCommit private and exposes it
thrrough overrideable methods such as getParents, getParent at index,
getParentCount and setParents. All other files other than RevCommit are
updating the usages of accessing RevCommits parents.

Change-Id: I2d13b001c599cc4ebc92d1ab6e07b07acb3b7fe5

2 years agoRefactor NameConflictTreeWalk.fastMin method 70/194970/4
Dmitrii Filippov [Mon, 1 Aug 2022 17:13:03 +0000 (19:13 +0200)]
Refactor NameConflictTreeWalk.fastMin method

Change-Id: Iac2e6f615463e18ddf788e6ddfe15ef023cac977

2 years agoFix BUILD rules for FilteredRenameDetectorTest 69/194969/3
Dmitrii Filippov [Mon, 1 Aug 2022 17:11:25 +0000 (19:11 +0200)]
Fix BUILD rules for FilteredRenameDetectorTest

The FilteredRenameDetectorTest was added in [1], but bazel build rules
were not updated.

[1] https://git.eclipse.org/r/c/jgit/jgit/+/194200

Change-Id: I7fc713e19b4768176eb84e9768137431b33a805e

2 years agoRename fastMinHasMatch to allTreesNamesMatchFastMinRef 67/194967/3
Dmitrii Filippov [Mon, 1 Aug 2022 16:43:43 +0000 (18:43 +0200)]
Rename fastMinHasMatch to allTreesNamesMatchFastMinRef

Change-Id: I2d9165616650e9d44745c6848d2cf1045f53f33c

2 years agoMerge "Document TreeWalk#min()"
Han-Wen NIenhuys [Mon, 1 Aug 2022 17:07:29 +0000 (13:07 -0400)]
Merge "Document TreeWalk#min()"

2 years agoMerge "NameConflictTreeWalk: respect git order on multi-tree iteration"
Han-Wen NIenhuys [Mon, 1 Aug 2022 15:25:10 +0000 (11:25 -0400)]
Merge "NameConflictTreeWalk: respect git order on multi-tree iteration"

2 years agoDocument TreeWalk#min() 61/194961/2
Han-Wen Nienhuys [Mon, 1 Aug 2022 13:39:07 +0000 (15:39 +0200)]
Document TreeWalk#min()

Change-Id: I29a6c023929d8270a8cdd1e7f012817a06428f42
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2 years agoSquash error-prone messages 60/194960/1
Han-Wen Nienhuys [Mon, 1 Aug 2022 13:26:47 +0000 (15:26 +0200)]
Squash error-prone messages

Change-Id: Ibbccc4d1faf1f0a1f0f4136c5bf075f155d80157
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2 years agoUse constants for git packet protocol line identifiers 80/194780/5
Thomas Wolf [Tue, 19 Jul 2022 08:13:48 +0000 (10:13 +0200)]
Use constants for git packet protocol line identifiers

Introduce named constants for packet line headers and use them instead
of direct string literals everywhere. This not only makes the code more
readable because we don't need NON-NLS markers, it also makes it more
robust since we can use the length of these constants instead of magic
numbers.

Change-Id: Ie4b7239e0b479a68a2dc23e6e05f25061d481a31
Signed-off-by: Thomas Wolf <twolf@apache.org>
2 years agoObjectDirectory: improve reading of shallow file 17/193417/12
Robin Müller [Tue, 17 May 2022 12:51:53 +0000 (14:51 +0200)]
ObjectDirectory: improve reading of shallow file

Use FileUtils.readWithRetries().

Change-Id: I5929184caca6b83a1ee87b462e541620bd68aa90

2 years agoFetch: add support for shallow 29/193329/14
Robin Müller [Fri, 13 May 2022 11:46:13 +0000 (13:46 +0200)]
Fetch: add support for shallow

This adds support for shallow cloning. The CloneCommand and the
FetchCommand now have the new methods setDepth, setShallowSince and
addShallowExclude to tell the server that the client doesn't want to
download the complete history.

Bug: 475615
Change-Id: Ic80fb6efb5474543ae59be590ebe385bec21cc0d

2 years ago[tests] Stabilize the HTTP server's request log 85/194785/3
Thomas Wolf [Tue, 19 Jul 2022 10:12:26 +0000 (12:12 +0200)]
[tests] Stabilize the HTTP server's request log

The TestRequestLog added log entries only after a request had been
handled. But the response is already sent at that point, so the
following sequence was possible:

  client sends request A
  server thread T1 handles request A and sends back response
  client receives response
  client sends request B
  server thread T2 handles request B (and sends back response)
  server thread T2 logs B
  server thread T1 logs A

Fix this by logging events before handling a request, and then filling
in the response data after the request has been handled. This should
avoid such inversions, at least for tests using a single single-threaded
client. With multiple concurrent or multi-threaded clients, all bets
about the log order would be off anyway.

Bug: 528187
Change-Id: I99a46df17231fa7c4f75a8c37e2c14dc098c4e22
Signed-off-by: Thomas Wolf <twolf@apache.org>
2 years agoNameConflictTreeWalk: respect git order on multi-tree iteration 66/194366/15
Dmitrii Filippov [Thu, 23 Jun 2022 13:28:10 +0000 (15:28 +0200)]
NameConflictTreeWalk: respect git order on multi-tree iteration

The NameConflictTreeWalk class is used in 3-way merge for iterating over
entries in 3 different commits. The class provides information about a
current entry and a state of the entry in commits (e.g entry is file,
entry is directory, entry is missing). In rare cases, the tree walker
can mix information about entries with different name.

The problem appears, because git uses unusual sorting order for
files. Example (this is a simplified real-life example):
Commit 1:
* gradle.properties - file
* gradle - directory (with nested files)
*   gradle/file - file in gradle directory
Commit 2:
* gradle.properties - file
* no entry with the name gradle
Commit 3:
* gradle.properties - file
* gradle - file
Here the names are ordered like this:
"gradle" file <"gradle.properties" file < "gradle/file" file.

NameConflictTreeWalk iterator already have code for processing
git sorting order, however in the example above the code doesn't
work correctly. Before the fix, NameConflictTreeWalk returns:
#next()
"gradle - directory" | "gradle.properties" | "gradle - file" - which is
wrong. The expected result is
#next()
"gradle - directory | MISSED_FILE | "gradle - file"
#next()
"gradle.properties"|"gradle.properties"|"gradle.properties"

Ensure that the "matches" field of tree iterators (which contains the
current path) is kept in sync in the case above.

Change-Id: Ief5aa06d80b358f4080043c8694aa0fd7c60045b
Signed-off-by: Dmitrii Filippov <dmfilippov@google.com>
2 years agoUpdate Orbit to S20220726152247 and bouncycastle to 1.71 47/194847/2
Matthias Sohn [Sat, 23 Jul 2022 10:10:40 +0000 (12:10 +0200)]
Update Orbit to S20220726152247 and bouncycastle to 1.71

Change-Id: I036b9029d575e66ab67839468e5d2a8a7dd85c83

2 years agoMerge "Create util class for work tree updating in both filesystem and index."
Han-Wen NIenhuys [Mon, 25 Jul 2022 13:44:28 +0000 (09:44 -0400)]
Merge "Create util class for work tree updating in both filesystem and index."

2 years agoCreate util class for work tree updating in both filesystem and index. 54/194654/19
Nitzan Gur-Furman [Thu, 30 Jun 2022 13:18:10 +0000 (16:18 +0300)]
Create util class for work tree updating in both filesystem and index.

This class intends to make future support in index updating easier.

This class currently extracts some logic from ResolveMerger. Logic
related to StreamSupplier was copied from ApplyCommand, which will be
integrated in a following change.

Change-Id: I8dc5a582433fc9891038c628385d3970b5a8984b

2 years agoFix the handling of .git/info/exclude and core.excludesFile 38/194738/1
Thomas Wolf [Fri, 15 Jul 2022 18:39:19 +0000 (20:39 +0200)]
Fix the handling of .git/info/exclude and core.excludesFile

The RootIgnoreNode in a WorkingTreeIterator must _not_ add the rules
from .git/info/exclude or from the file designated by git config
core.excludesFile to the list of rules read from the root .gitignore.
These really must be separate nodes in a hierarchy, otherwise the
precedence rules from [1] are violated and the outcome is not the
same as in C git.

[1] https://git-scm.com/docs/gitignore

Bug: 580381
Change-Id: I57802ba7bbbe4f183504c882b6c77a78cc3a9b99
Signed-off-by: Thomas Wolf <twolf@apache.org>
2 years agoRemove version constraints from org.tukaani.xz package 88/194688/1
Andrey Loskutov [Wed, 13 Jul 2022 07:46:11 +0000 (09:46 +0200)]
Remove version constraints from org.tukaani.xz package

Fixes compilation errors in org.eclipse.jgit.test with 4.25 platform

Bug: 580370
Change-Id: I9b7cb21bcbb87d14176fc0675bf03d20f81fa009

2 years agoMerge branch 'stable-6.2' 97/194597/1
Matthias Sohn [Wed, 6 Jul 2022 15:02:58 +0000 (17:02 +0200)]
Merge branch 'stable-6.2'

* stable-6.2:
  UploadPack: don't prematurely terminate timer in case of error
  Do not create reflog for remote tracking branches during clone
  UploadPack: do not check reachability of visible SHA1s
  Add missing package import javax.management to org.eclipse.jgit

Change-Id: Ia2280b848cea7bdfa5bc48356484e040d159845d

2 years agoMerge branch 'stable-6.1' into stable-6.2 96/194596/1
Matthias Sohn [Wed, 6 Jul 2022 15:01:03 +0000 (17:01 +0200)]
Merge branch 'stable-6.1' into stable-6.2

* stable-6.1:
  UploadPack: don't prematurely terminate timer in case of error
  Do not create reflog for remote tracking branches during clone
  UploadPack: do not check reachability of visible SHA1s
  Add missing package import javax.management to org.eclipse.jgit

Change-Id: Ib3ff6a038e1b92a931a7f2624c19bbefd8cb95fd

2 years agoMerge branch 'stable-6.0' into stable-6.1 95/194595/1
Matthias Sohn [Wed, 6 Jul 2022 15:00:09 +0000 (17:00 +0200)]
Merge branch 'stable-6.0' into stable-6.1

* stable-6.0:
  UploadPack: don't prematurely terminate timer in case of error
  Do not create reflog for remote tracking branches during clone
  UploadPack: do not check reachability of visible SHA1s
  Add missing package import javax.management to org.eclipse.jgit

Change-Id: I08734ee2c8f3296d908da6a29d53ed87c4b48eb2

2 years agoMerge branch 'stable-5.13' into stable-6.0 94/194594/1
Matthias Sohn [Wed, 6 Jul 2022 08:38:30 +0000 (10:38 +0200)]
Merge branch 'stable-5.13' into stable-6.0

* stable-5.13:
  UploadPack: don't prematurely terminate timer in case of error
  Do not create reflog for remote tracking branches during clone
  UploadPack: do not check reachability of visible SHA1s
  Add missing package import javax.management to org.eclipse.jgit

Change-Id: I6db0a4d74399fde892eeec62efd2946f97547a5d

2 years agoAdd aarch64 environment to target platform configuration 34/194534/1
Matthias Sohn [Sat, 2 Jul 2022 19:12:13 +0000 (21:12 +0200)]
Add aarch64 environment to target platform configuration

Change-Id: Ib2b25f2f0abb9aac6327c030fc530c0c361cc0f9

2 years agoJGit blame very slow for large merge commits that rename files 00/194200/7
Simeon Andreev [Wed, 15 Jun 2022 20:23:43 +0000 (22:23 +0200)]
JGit blame very slow for large merge commits that rename files

Adjusted BlameGenerator to filter rename detection with the blame path.
This reduces the running time of the blame computation significantly,
for repositories with massive commits involving renames.

The filtered rename detection is made (internally) available with:
org.eclipse.jgit.internal.diff.FilteredRenameDetector

Bug: 578900
Change-Id: I6580004e81102d685081b8180da1587a35073d36
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2 years agoUploadPack: don't prematurely terminate timer in case of error 00/194500/2
Matthias Sohn [Wed, 29 Jun 2022 12:58:17 +0000 (14:58 +0200)]
UploadPack: don't prematurely terminate timer in case of error

In uploadWithExceptionPropagation don't prematurely terminate timer in
case of error to enable reporting it to the client. Expose a close
method so that callers can terminate it at the appropriate time.

If the timer is already terminated when trying to report it to the
client this failed with the error java.lang.IllegalStateException:
"Timer already terminated".

Bug: 579670
Change-Id: I95827442ccb0f9b1ede83630cf7c51cf619c399a

2 years agoMerge "Do not create reflog for remote tracking branches during clone" into stable...
Matthias Sohn [Sun, 26 Jun 2022 19:36:03 +0000 (15:36 -0400)]
Merge "Do not create reflog for remote tracking branches during clone" into stable-5.13

2 years agoDo not create reflog for remote tracking branches during clone 07/193007/24
Luca Milanesio [Fri, 29 Apr 2022 15:45:03 +0000 (16:45 +0100)]
Do not create reflog for remote tracking branches during clone

When using JGit on a non-bare repository, the CloneCommand
it previously created local reflogs for all branches including remote
tracking ones, causing the generation of a potentially large
number of files on the local filesystem.

The creation of the remote-tracking branches (refs/remotes/*) during
clone is not an issue for the local filesystem because all of them are
stored in a single packed-refs file. However, the creation of a large
number of ref logs on a local filesystem IS an issue because it
may not be tuned or initialised in term of inodes to contain a very
large number of files.

When a user (or a CI system) performs the CloneCommand against
a potentially large repository (e.g., millions of branches), it is
interested in working or validating a single branch or tag and is
unlikely to work with all the remote-tracking branches.
The eager creation of a reflogs for all the remote-tracking branches is
not just a performance issue but may also compromise the ability to
use JGit for cloning a large repository.

The behaviour implemented in this change is also consistent with the
optimisation done in the C code-base [1].

We differentiate between clone and fetch commands using --branch
<initialBranch> option, that is only available in clone command,
and is set as HEAD per default.

[1] https://github.com/git/git/commit/58f233ce1ed67bbc31a429fde5c65d5050fdbd7d

Bug: 579805
Change-Id: I58d0d36a8a4ce42e0f59b8bf063747c4b81bd859
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
2 years agoUploadPack: do not check reachability of visible SHA1s 96/193496/11
Luca Milanesio [Thu, 19 May 2022 10:12:28 +0000 (11:12 +0100)]
UploadPack: do not check reachability of visible SHA1s

When JGit needs to serve a Git client requesting SHA1s
during the want phase, it needs to make a full reachability
check from the advertised refs to the ones requested to
keep all objects in the correct scope of confidentiality
allowed by the avertised refs.

The check is also performed when the SHA1 corresponds to
one of the tips of the advertised refs which is a waste of
resources.

Example:

fetch> ref-prefix refs/heads/foo
fetch< 900505eb8ce8ced2a1757906da1b25c357b9654e refs/heads/foo
fetch< 0000
fetch> command=fetch
fetch> 0001
fetch> thin-pack
fetch> ofs-delta
fetch> want 900505eb8ce8ced2a1757906da1b25c357b9654e

The SHA1 in the want is the tip of refs/heads/foo and therefore
the full reachability check can be shortened and resolved more
quickly.

Change-Id: I49bd9e2464e0bd3bca2abf14c6e9df550d07383b
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
2 years agoFix warnings about non-externalized string literals 72/194372/1
Thomas Wolf [Thu, 23 Jun 2022 18:32:47 +0000 (20:32 +0200)]
Fix warnings about non-externalized string literals

Four occurrences in RefSpec marked with //$NON-NLS-<n>$.

Change-Id: Ie603a58c41357562f0739445e3fe77ca87a3eb54
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years ago[sshd] Correct signature for RSA keys from an SSH agent 62/194362/1
Thomas Wolf [Thu, 23 Jun 2022 10:14:37 +0000 (12:14 +0200)]
[sshd] Correct signature for RSA keys from an SSH agent

Ensure that there is always a list of signature factories in public key
authentication. For keys loaded directly, Apache MINA sshd will use the
(always set) list from the SSH session by default, but for keys from an
SSH agent it won't and instead consider the list set locally on the
UserAuthPublicKey instance. Only that one is null by default, and then
Apache MINA sshd just uses the key type as signature type. Which for
RSA keys from an agent is the "ssh-rsa" signature, i.e., the deprecated
SHA1 signature.

Fix this by explicitly propagating the list from the session to the
UserAuthPublicKey instance if not set already.

Upstream issue is SSHD-1272.[1]

[1] https://issues.apache.org/jira/browse/SSHD-1272

Bug: 580073
Change-Id: Id7a783f19d06c9e7c8494b1fbf7465d392ffc366
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoRun tests that checks araxis output only on Linux 32/194232/3
Simeon Andreev [Fri, 17 Jun 2022 10:19:50 +0000 (12:19 +0200)]
Run tests that checks araxis output only on Linux

Bug: 580189
Change-Id: Ieb14f5cf061fcb468b602c7f27e27b672e3b09e2
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2 years agoAdd missing package import javax.management to org.eclipse.jgit 34/194234/1
Matthias Sohn [Fri, 17 Jun 2022 11:49:59 +0000 (13:49 +0200)]
Add missing package import javax.management to org.eclipse.jgit

Class org.eclipse.jgit.util.Monitoring uses JMX hence we need this
import otherwise OSGi applications can face ClassNotFoundException.

Bug: 577018
Change-Id: Ifd75337b87c7faec95d333b771bb0a2f3e46a418

2 years agoAdd 4.25 target platform for Eclipse 2022-09 28/194228/1
Matthias Sohn [Fri, 17 Jun 2022 08:27:13 +0000 (10:27 +0200)]
Add 4.25 target platform for Eclipse 2022-09

Change-Id: Icc6d1bf340baabbc271f6572b1d45420ae61f314

2 years agoSuppress API errors raised for new API introduced in 5.13.1 27/194227/1
Matthias Sohn [Fri, 17 Jun 2022 08:24:03 +0000 (10:24 +0200)]
Suppress API errors raised for new API introduced in 5.13.1

Change-Id: I55ec887c3192468d7773e8cf0236c7ed48af3ade

2 years agoEclipse 4.24 was released, adapt p2 URL accordingly 07/194207/2
Matthias Sohn [Thu, 16 Jun 2022 10:30:09 +0000 (12:30 +0200)]
Eclipse 4.24 was released, adapt p2 URL accordingly

Change-Id: I807f15507f7ba1d03f0633b121419170f5423c02

2 years agoFix DefaultCharset bug pattern flagged by error prone 19/194019/6
David Ostrovsky [Wed, 8 Jun 2022 05:22:04 +0000 (07:22 +0200)]
Fix DefaultCharset bug pattern flagged by error prone

See more details in: [1].

[1] https://errorprone.info/bugpattern/DefaultCharset
Change-Id: I3de0be57a2d74490a5b4e66801e9767b38f13bf9

2 years agoUse SystemReader#getDefaultCharset to read console input 12/194212/2
David Ostrovsky [Thu, 16 Jun 2022 16:04:06 +0000 (18:04 +0200)]
Use SystemReader#getDefaultCharset to read console input

In I986f97a410 SystemReader.getDefaultCharset() that provides the
locale-dependent charset the way JEP 400 recommends.

Change-Id: I30560ac47e450070e3864325d153d45f1a66882c

2 years agoMerge "Merge branch 'stable-6.2'"
Matthias Sohn [Fri, 17 Jun 2022 07:35:40 +0000 (03:35 -0400)]
Merge "Merge branch 'stable-6.2'"

2 years agoAnnotate the exception with the possible failure reason when Bitmaps are not enabled. 45/192845/3
Ronald Bhuleskar [Wed, 20 Apr 2022 17:28:30 +0000 (10:28 -0700)]
Annotate the exception with the possible failure reason when Bitmaps are not enabled.

When bitmaps are not enabled the RevWalk is expensive. AllowFilter
provides an override to continue walking. PedestrianWalk can be
expensive and fails when the clone is a partial clone using
--filter=tree:0. This can only work when bitmaps are enabled.

Having a message to the exception improves debuggability of such cases.

Change-Id: Ie61de20a39a765e6f6f77e81b4c3bbda2eefbaf3

2 years agoMerge branch 'stable-6.2' 95/194195/1
Matthias Sohn [Wed, 15 Jun 2022 15:40:31 +0000 (17:40 +0200)]
Merge branch 'stable-6.2'

* stable-6.2:
  Prepare 5.13.2-SNAPSHOT builds
  JGit v5.13.1.202206130422-r
  AmazonS3: Add support for AWS API signature version 4

Change-Id: I13514595f3a710b0d6e3c2de62f6508b950d22f9

2 years agoMerge branch 'stable-6.1' into stable-6.2 94/194194/1
Matthias Sohn [Wed, 15 Jun 2022 15:39:52 +0000 (17:39 +0200)]
Merge branch 'stable-6.1' into stable-6.2

* stable-6.1:
  Prepare 5.13.2-SNAPSHOT builds
  JGit v5.13.1.202206130422-r
  AmazonS3: Add support for AWS API signature version 4

Change-Id: Id4965aacd4e2ea1e8575a2c1bd4845729db6049a

2 years agoMerge branch 'stable-6.0' into stable-6.1 93/194193/1
Matthias Sohn [Wed, 15 Jun 2022 14:32:08 +0000 (16:32 +0200)]
Merge branch 'stable-6.0' into stable-6.1

* stable-6.0:
  Prepare 5.13.2-SNAPSHOT builds
  JGit v5.13.1.202206130422-r
  AmazonS3: Add support for AWS API signature version 4

Change-Id: Ie9c38ab8033fe1283e8b444b6acd3f4298062bf3

2 years agoMerge branch 'stable-5.13' into stable-6.0 88/194188/1
Matthias Sohn [Wed, 15 Jun 2022 14:31:38 +0000 (16:31 +0200)]
Merge branch 'stable-5.13' into stable-6.0

* stable-5.13:
  Prepare 5.13.2-SNAPSHOT builds
  JGit v5.13.1.202206130422-r
  AmazonS3: Add support for AWS API signature version 4

Change-Id: Ibd663a1d874d1aac274abc3dd44354fd99f64c39

2 years agoPrepare 5.13.2-SNAPSHOT builds 46/194146/1
Matthias Sohn [Mon, 13 Jun 2022 22:41:18 +0000 (00:41 +0200)]
Prepare 5.13.2-SNAPSHOT builds

Change-Id: I4862e5d80a7d95a1a119d06306e3f6927445d1d3

2 years agoJGit v5.13.1.202206130422-r 19/194119/1 v5.13.1.202206130422-r
Matthias Sohn [Mon, 13 Jun 2022 08:22:43 +0000 (10:22 +0200)]
JGit v5.13.1.202206130422-r

Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ife74d64e8171c68dbf08271492c0ac852a6dc51c

2 years agoAmazonS3: Add support for AWS API signature version 4 12/193712/6
eric.steele [Wed, 1 Jun 2022 01:03:17 +0000 (18:03 -0700)]
AmazonS3: Add support for AWS API signature version 4

Updating the AmazonS3 class to support AWS Signature version 4 because
version 2 is no longer supported in all AWS regions. The version can be
selected with the new 'aws.api.signature.version' property (defaults to
2 for backwards compatibility). When set to '4', the user must also
specify the AWS region via the 'region' property. The 'region' property
must match the region that the 'domain' property resolves to.

Bug: 579907
Change-Id: If289dbc6d0f57323cfeaac2624c4eb5028f78d13

2 years agoFix typo in DiffTools#compare javadoc 09/194109/1
Matthias Sohn [Sun, 12 Jun 2022 22:58:47 +0000 (00:58 +0200)]
Fix typo in DiffTools#compare javadoc

Change-Id: Ib9f8453b3b948b098d433e1b1426c32b4b4f5af8

2 years agoUpdate jgit-last-release-version to 6.2.0.202206071550-r 08/194108/1
Matthias Sohn [Sun, 12 Jun 2022 20:14:54 +0000 (22:14 +0200)]
Update jgit-last-release-version to 6.2.0.202206071550-r

Change-Id: I055d8512e5acfb3a65ec68debf2ad12e100bcbe7

2 years agoMerge branch 'stable-6.2' 07/194107/1
Matthias Sohn [Sun, 12 Jun 2022 20:13:53 +0000 (22:13 +0200)]
Merge branch 'stable-6.2'

* stable-6.2:
  Prepare 6.2.1-SNAPSHOT builds
  JGit v6.2.0.202206071550-r

Change-Id: Iecdf7e16c9625cc1855f635f59959b4d24f28f95

2 years agoPrepare 6.2.1-SNAPSHOT builds 15/194015/1
Matthias Sohn [Tue, 7 Jun 2022 20:31:32 +0000 (22:31 +0200)]
Prepare 6.2.1-SNAPSHOT builds

Change-Id: I4a0f3919ff43a3b9fafa85b8ecec2d760b7eb161

2 years agoJGit v6.2.0.202206071550-r 13/194013/1 v6.2.0.202206071550-r
Matthias Sohn [Tue, 7 Jun 2022 19:49:30 +0000 (21:49 +0200)]
JGit v6.2.0.202206071550-r

Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ib4ae85a0cabcc9cb867f2c85034d72fb676a500a

2 years agoMerge branch 'stable-6.2' 74/193974/1
Matthias Sohn [Tue, 7 Jun 2022 09:37:25 +0000 (11:37 +0200)]
Merge branch 'stable-6.2'

* stable-6.2:
  Update DEPENDENCIES for 6.2.0 to be released with 2022-06
  Update orbit to R20220531185310 for 2022-06
  Prepare 6.2.0-SNAPSHOT builds
  Fix connection leak for smart http connections
  JGit v6.2.0.202206011217-rc1

Change-Id: Ia11744588952f8627ea37421821759675aa79688

2 years agoMerge branch 'stable-6.1' into stable-6.2 73/193973/1
Matthias Sohn [Tue, 7 Jun 2022 09:36:46 +0000 (11:36 +0200)]
Merge branch 'stable-6.1' into stable-6.2

* stable-6.1:
  Fix connection leak for smart http connections

Change-Id: I4d38c62fa5416fd40b699de5b0ecfa03d498c21d

2 years agoMerge branch 'stable-6.0' into stable-6.1 72/193972/1
Matthias Sohn [Tue, 7 Jun 2022 09:36:11 +0000 (11:36 +0200)]
Merge branch 'stable-6.0' into stable-6.1

* stable-6.0:
  Fix connection leak for smart http connections

Change-Id: I8b7e643b87c0f788cdafb060a2c9e8b4ef6f7375

2 years agoMerge branch 'stable-5.13' into stable-6.0 71/193971/1
Matthias Sohn [Tue, 7 Jun 2022 09:35:13 +0000 (11:35 +0200)]
Merge branch 'stable-5.13' into stable-6.0

* stable-5.13:
  Fix connection leak for smart http connections

Change-Id: Ic851f2c4660ed761f5527e405b116b54da42fb7c

2 years agoMerge branch 'stable-5.12' into stable-5.13 70/193970/1
Matthias Sohn [Tue, 7 Jun 2022 09:34:25 +0000 (11:34 +0200)]
Merge branch 'stable-5.12' into stable-5.13

* stable-5.12:
  Fix connection leak for smart http connections

Change-Id: Id34f29c1b27a80c2b56c911cad7e3f64ef63af48

2 years agoMerge branch 'stable-5.11' into stable-5.12 69/193969/1
Matthias Sohn [Tue, 7 Jun 2022 09:33:38 +0000 (11:33 +0200)]
Merge branch 'stable-5.11' into stable-5.12

* stable-5.11:
  Fix connection leak for smart http connections

Change-Id: I6caabf4774ccf34706cef846c1087710f67e2ecd

2 years agoMerge branch 'stable-5.10' into stable-5.11 67/193967/2
Matthias Sohn [Tue, 7 Jun 2022 08:50:25 +0000 (10:50 +0200)]
Merge branch 'stable-5.10' into stable-5.11

* stable-5.10:
  Fix connection leak for smart http connections

Change-Id: I3885c6114caed897f762f5ce523d3b27288205b2

2 years agoMerge branch 'stable-5.9' into stable-5.10 66/193966/1
Matthias Sohn [Tue, 7 Jun 2022 08:42:22 +0000 (10:42 +0200)]
Merge branch 'stable-5.9' into stable-5.10

* stable-5.9:
  Fix connection leak for smart http connections

Change-Id: I5e7144b2f5cd850978220c476947001ae2debb8e

2 years agoPrepare 6.3.0-SNAPSHOT builds 61/193961/1
Matthias Sohn [Mon, 6 Jun 2022 23:02:10 +0000 (01:02 +0200)]
Prepare 6.3.0-SNAPSHOT builds

Change-Id: I092fdd2c35d85bf35e3ef700aa7078e6d304d977

2 years agoUpdate DEPENDENCIES for 6.2.0 to be released with 2022-06 59/193959/1
Matthias Sohn [Mon, 6 Jun 2022 21:30:34 +0000 (23:30 +0200)]
Update DEPENDENCIES for 6.2.0 to be released with 2022-06

Change-Id: Ifdead74d1000fb110802eeb421b021ab674a9d59

2 years agoUpdate orbit to R20220531185310 for 2022-06 57/193957/1
Matthias Sohn [Mon, 6 Jun 2022 21:24:23 +0000 (23:24 +0200)]
Update orbit to R20220531185310 for 2022-06

Change-Id: I436ba965e5f6677f7967ee8f4992dfb467054472

2 years agoMerge branch 'master' into stable-6.2 56/193956/1
Matthias Sohn [Mon, 6 Jun 2022 20:52:49 +0000 (22:52 +0200)]
Merge branch 'master' into stable-6.2

* master:
  [releng] Fix MANIFEST.MF of o.e.j.ssh.apache.agent

Change-Id: Ica9069dd97b58aeefc6ac39f2034e513eb58f1e6

2 years agoPrepare 6.2.0-SNAPSHOT builds 54/193954/1
Matthias Sohn [Mon, 6 Jun 2022 20:08:59 +0000 (22:08 +0200)]
Prepare 6.2.0-SNAPSHOT builds

Change-Id: Id2ad8d5b561620723b2c52c86909321d628de12f

2 years ago[releng] Fix MANIFEST.MF of o.e.j.ssh.apache.agent 45/193945/1
Thomas Wolf [Mon, 6 Jun 2022 12:42:25 +0000 (14:42 +0200)]
[releng] Fix MANIFEST.MF of o.e.j.ssh.apache.agent

Add the missing Bundle-Localization header.

Bug: 580081
Change-Id: If21e0778dbb60b49a8f83030461670656eeb0ce4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2 years agoFix connection leak for smart http connections 39/193939/3
Saša Živkov [Fri, 3 Jun 2022 14:36:43 +0000 (16:36 +0200)]
Fix connection leak for smart http connections

SmartHttpPushConnection: close InputStream and OutputStream after
processing. Wrap IOExceptions which aren't TransportExceptions already
as a TransportException.

Also-By: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I8e11d899672fc470c390a455dc86367e92ef9076

2 years agoMerge branch 'master' into stable-6.2 34/193934/1
Andrey Loskutov [Fri, 3 Jun 2022 13:49:45 +0000 (15:49 +0200)]
Merge branch 'master' into stable-6.2

* master:
  Adapt diff- and merge tool code for PGM and EGit usage
  Teach JGit to handle external diff/merge tools defined in
.gitattributes

Change-Id: I3aefc14160caaac859bd3548460dd755ebe42fc5

2 years agoTeach JGit to handle external diff/merge tools defined in .gitattributes 43/166943/21
Andre Bossert [Tue, 21 Jan 2020 09:13:43 +0000 (10:13 +0100)]
Teach JGit to handle external diff/merge tools defined in .gitattributes

Adds API that allows UI to find (and handle) diff/merge tools, specific
for the given path. The assumption is that user can specify file type
specific diff/merge tools via gitattributes.

Bug: 552840
Change-Id: I1daa091e9afa542a9ebb5417853dff0452ed52dd
Signed-off-by: Mykola Zakharchuk <zakharchuk.vn@gmail.com>
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Signed-off-by: Andre Bossert <andre.bossert@siemens.com>