Commit Graph

313 Commits

Author SHA1 Message Date
Matthias Sohn 642f160236 Use ShutdownHook to gracefully handle JVM shutdown
in all classes which already registered their own shutdown hook
- CloneCommand
- GC#PidLock
- FS#FileStoreAttributes
- LocalDiskRepositoryTestCase#Cleanup

Change-Id: I3efc1f83f3cbbf43eeeaaedcd2bee1ef31971a72
2023-09-12 22:43:15 +02:00
Thomas Wolf e3798df6e8 OSGi: move plugin localization to subdirectory
OSGi can have its plugin localization at an arbitrary place; there is
no need to have it in a top-level plugin.properties file. In non-OSGi
environments having the files at the root level may mean that these
files clash with each other, or, as in the referenced bug, with some
third-party plug-in's plugin.properties, which may not even have
anything to do with localization.

Move our OSGi localization to a subfolder OSGI-INF/l10n. For OSGi
environments, that's just as good, and for non-OSGi environments it
avoid clashes with other root level items on the classpath or in a fat
JAR.

For fragments, use neither plugin.properties (which would clash with the
host plug-in's plugin.properties) nor fragment.properties (which might
clash with other fragments for the same fragment host bundle). Instead
use names "relative" to the host bundle.

Bug: 582394
Change-Id: Ifbcd046d912e2cfe86c0f7259c5ca8de599d9aa1
Signed-off-by: Thomas Wolf <twolf@apache.org>
2023-09-12 20:27:59 +02:00
Matthias Sohn 3a3b72cf90 Prepare 6.8.0-SNAPSHOT builds
Change-Id: Ifc81f0a96c2ced0b25926b9daa539d9cfc951925
2023-09-07 02:24:53 +02:00
Matthias Sohn bb12dd4cbd Prepare 6.7.1-SNAPSHOT builds
Change-Id: I96097ef8c6f198220f513bbc6d5f8881834a1491
2023-09-07 02:03:54 +02:00
Matthias Sohn ea02caf1e7 JGit v6.7.0.202309050840-r
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ibe952d97bc178adb909cdd40f48957f5b68af699
2023-09-05 14:41:09 +02:00
Matthias Sohn c5d8936c80 Prepare 6.7.0-SNAPSHOT builds
Change-Id: I49751232464e70b7d1dc3292a9f36b7a7015e44f
2023-08-30 17:46:26 +02:00
Matthias Sohn c54acc5822 JGit v6.7.0.202308301100-rc1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I712a9f6830364ed404d03f3a145c055906273544
2023-08-30 16:57:25 +02:00
Martin Fick e7a09e316d Introduce core.packedIndexGitUseStrongRefs config key
Introduce a core.packedIndexGitUseStrongRefs configuration key, which
defaults to true so that the current behavior does not change. However,
setting it to false allows soft references to be used for Pack indices
instead of strong references so that they can be garbage collected when
there is memory pressure.

Pack objects can be large when associated with pack files with large
object counts, and this memory is not really accounted for or tracked by
the WindowCache and it can be very substantial at times, especially with
many large object count projects. A particularly problematic use case is
Gerrit's ls-projects command which loads very little data in the
WindowCache via ByteWindows, but ends up loading and holding many entire
indices in memory, sometimes even after the ByteWindows for their Pack
objects have already been garbage collected since they won't get cleared
until after a new ByteWindow is loaded. By using SoftReferences, single
use indices can get cleared when there is memory pressure and OOMs can
be easily avoided, drastically reducing the amount of memory required to
perform an ls-projects on large sites with many projects and large
object counts.

On one of our test sites, an ls-projects command with strong index
references requires more than 66GB of heap to complete successfully,
with soft index references it requires less than 23GB.

Change-Id: I3cb3df52f4ce1b8c554d378807218f199077d80b
Signed-off-by: Martin Fick <quic_mfick@quicinc.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2023-08-26 16:16:43 +02:00
Matthias Sohn 8879eec460 Add missing package import needed to use MurmurHash3
This was missed in 49beb5ae51 and broke the OSGi classpath.

Change-Id: I08a307e9e3aade4ed8a5b5e2cc5e5d03c57dfa56
2023-07-25 22:06:27 +02:00
Matthias Sohn 9afff3e808 Prepare 6.7.0-SNAPSHOT builds
Change-Id: I50ff7ee31046cfc29a087c8963be3deae24b1c9c
2023-05-24 17:31:26 +02:00
Matthias Sohn f34ae6fe31 Prepare 6.6.0-SNAPSHOT builds
Change-Id: I17893f9db12bcb208866f40a06cd4f1ccbb4fe30
2023-03-01 15:40:45 +01:00
Matthias Sohn 70b436b1b2 Add TernarySearchTree
A ternary search tree is a type of tree where nodes are arranged in a
manner similar to a binary search tree, but with up to three children
rather than the binary tree's limit of two.

Each node of a ternary search tree stores a single character, a
reference to a value object and references to its three children named
equal kid, lo kid and hi kid. The lo kid pointer must point to a node
whose character value is less than the current node. The hi kid pointer
must point to a node whose character is greater than the current
node.[1] The equal kid points to the next character in the word. Each
node in a ternary search tree represents a prefix of the stored strings.
All strings in the middle subtree of a node start with that prefix.

Like other prefix trees, a ternary search tree can be used as an
associative map with the ability for incremental string search. Ternary
search trees are more space efficient compared to standard prefix trees,
at the cost of speed.

They allow efficient prefix search which is important to implement
searching refs by prefix in a RefDatabase.

Searching by prefix returns all keys if the prefix is an empty string.

Bug: 576165
Change-Id: If160df70151a8e1c1bd6716ee4968e4c45b2c7ac
2023-01-04 23:51:23 +01:00
Thomas Wolf f38a0614f5 Fix API warnings for the new CommitGraph
Mark the internal package as internal, visible only to the test bundle.
Add an API filter for CoreConfig.DEFAULT_COMMIT_GRAPH_ENABLE.

Change-Id: Ib62a93b873c93daf638b6c57e62fd267e16801bb
Signed-off-by: Thomas Wolf <twolf@apache.org>
2022-12-17 10:36:50 +01:00
Matthias Sohn ebc1f7d65c commitgraph package: fix exports/imports, add @since tag for new API
Change-Id: I9175b1d796f91f5ba4e21d3418550ae451c054b0
2022-12-08 02:00:58 +01:00
Matthias Sohn 2e28f27c26 Prepare 6.5.0-SNAPSHOT builds
Change-Id: I4238b6181e96e22e540cf34802a332f868cb6dfb
2022-11-23 19:09:33 +01:00
Matthias Sohn 85182df267 Prepare 6.4.0-SNAPSHOT builds
Change-Id: I47ca5f1d0263caa0bfc7c303042360c6c5ac4dec
2022-09-14 13:56:40 +02:00
Matthias Sohn fb377b09eb Prepare 6.3.1-SNAPSHOT builds
Change-Id: I44e159eca4131880d74d3078060e7e20f9b5ce76
2022-09-12 10:09:10 +02:00
Matthias Sohn 68e8ecc91b JGit v6.3.0.202209071007-r
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Iea3fae9f6f6c5fb0a79f7684334a3e0059738c4f
2022-09-07 16:07:11 +02:00
Matthias Sohn f8104e25f1 JGit v6.3.0.2022009070944-r
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I3cc78dbcf8c7970e80bf1499751611110ec2b30b
2022-09-07 15:39:48 +02:00
Matthias Sohn 3a12709851 Prepare 6.3.0-SNAPSHOT builds
Change-Id: Ie398b651c5308ec86812bf01fcc563d3e679c828
2022-08-17 07:44:50 +02:00
Matthias Sohn 85a4809996 JGit v6.3.0.202208161710-m3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I0954d11a1f35eff196b157df3aa8386476c48a7e
2022-08-16 23:09:30 +02:00
Matthias Sohn f6935d8cd2 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
2022-07-06 17:02:58 +02:00
Matthias Sohn 34600e3ca2 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
2022-07-06 17:02:04 +02:00
Matthias Sohn d01376106a 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
2022-07-06 17:00:42 +02:00
Matthias Sohn 9f7d77b608 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
2022-07-06 16:59:30 +02:00
Simeon Andreev 1a364c49ec 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>
2022-07-01 16:10:13 +02:00
Matthias Sohn f4cbf31ae4 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
2022-06-17 13:49:59 +02:00
Matthias Sohn db074a1352 Prepare 5.13.2-SNAPSHOT builds
Change-Id: I4862e5d80a7d95a1a119d06306e3f6927445d1d3
2022-06-14 00:41:18 +02:00
Matthias Sohn b34961a493 JGit v5.13.1.202206130422-r
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ife74d64e8171c68dbf08271492c0ac852a6dc51c
2022-06-13 10:22:43 +02:00
Matthias Sohn a9f535e104 Prepare 6.2.1-SNAPSHOT builds
Change-Id: I4a0f3919ff43a3b9fafa85b8ecec2d760b7eb161
2022-06-07 22:31:32 +02:00
Matthias Sohn 236b45f95b JGit v6.2.0.202206071550-r
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ib4ae85a0cabcc9cb867f2c85034d72fb676a500a
2022-06-07 21:49:30 +02:00
Matthias Sohn 8137e5e746 Prepare 6.3.0-SNAPSHOT builds
Change-Id: I092fdd2c35d85bf35e3ef700aa7078e6d304d977
2022-06-07 01:02:10 +02:00
Matthias Sohn cc862f843a Prepare 6.2.0-SNAPSHOT builds
Change-Id: Id2ad8d5b561620723b2c52c86909321d628de12f
2022-06-06 22:08:59 +02:00
Andrey Loskutov 2ef2a3562e 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
2022-06-03 15:51:54 +02:00
Andre Bossert ff77d412a9 Adapt diff- and merge tool code for PGM and EGit usage
see: https://git-scm.com/docs/git-mergetool

* DiffTools and MergeTools
  * store FS, gitDir and workTree for usage without
git repository (for EGit preferences)
  * add getUserDefinedToolNames() and getPredefinedToolNames()
  * replace getToolNames() with getAllToolNames() that combines the two
lists and put default tool name (diff.tool or merge.tool) as first
element (for EGit preferences)
* FileElement: refactoring of getFile() and friends to have midName
(LOCAL, REMOTE etc.) always added to the temp file name (also for EGit)
* FileElement: added directory attribute that is used in getFile() to
return path with workDir as parent
* DiffTool and MergeTool
  * added errw.flush(), because sometimes stderr is not printed in case
of die()
  * print e.getMessage() always to stderr
* Moved toolname and prompt logic into managers
* Exported internal packages required for egit.ui

Bug: 356832
Change-Id: I71e7f4dc362169a7612ca4f6546a021bc4b2b5f4
Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
Signed-off-by: Tim Neumann <Tim.Neumann@advantest.com>
2022-06-02 10:36:31 +02:00
Matthias Sohn 7b1ade51d2 JGit v6.2.0.202206011217-rc1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Id9639b466583d8c373ef700402cb685ce4a8ee15
2022-06-01 18:17:31 +02:00
Matthias Sohn 760d8ea608 Prepare 6.2.0-SNAPSHOT builds
Change-Id: I9d6afd80cc024d6e03aa46bbaaaeec10b60fb485
2022-05-26 23:24:41 +02:00
Matthias Sohn 649b2b72cd JGit v6.2.0.202205251150-m3
Change-Id: I48492aef02c2ea39cec171d84e92643859e064a6
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2022-05-25 16:49:01 +02:00
Matthias Sohn b969c44c00 Prepare 6.2.0-SNAPSHOT builds
Change-Id: Ic3788b38d6408e83729caa718c128a5632798a60
2022-05-05 13:39:09 +02:00
Matthias Sohn 6ac09896b2 JGit v6.2.0.202205041315-m2
Change-Id: Ie13beac020e79182a4058ba67550bb78b2008833
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2022-05-04 19:25:04 +02:00
Matthias Sohn 8f7ef245f0 Prepare 6.1.1-SNAPSHOT builds
Change-Id: Ifc80355025d8459245843be1c24dc5a286913e77
2022-03-08 17:04:10 +01:00
Matthias Sohn e982de3fcb JGit v6.1.0.202203080745-r
Change-Id: I8766ed400020c9571f321bbbfe34b0688af0107d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2022-03-08 13:45:56 +01:00
Matthias Sohn d0ed6016d4 Prepare 6.2.0-SNAPSHOT builds
Change-Id: Ic2dde88bee3242169d6fa50956f8938f3fc4ba8e
2022-03-03 10:49:58 +01:00
Matthias Sohn 60d52c9cfd Prepare 6.1.0-SNAPSHOT builds
Change-Id: I525fc1258a729c36d63fdb3c8170e9f04ad55cec
2022-03-02 22:28:46 +01:00
Matthias Sohn 4b9fb3161c JGit v6.1.0.202203021511-rc1
Change-Id: I4c75a58fd76102e773af4f1f8a1487d5e7ffc7cf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2022-03-02 21:11:54 +01:00
Matthias Sohn 8845f2e91b Prepare 6.1.0-SNAPSHOT builds
Change-Id: I30a89277373ad62c857151532942e135e34d1d0c
2022-03-01 17:21:11 +01:00
Matthias Sohn 261f46dc43 JGit v6.1.0.202202221755-m3
Change-Id: Idcd46e05ca3eec376f8ac83209dba0978e004f9a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2022-02-22 23:55:35 +01:00
Matthias Sohn 9a57ae4707 Let org.eclipse.jgit.pgm use BooleanTriState
Change-Id: I575cd5e1ecd326514a8bb4c36a86a2dc71ba5457
2022-01-19 09:54:37 +01:00
Andre Bossert 14a59bdc7b Add config reader for user-defined difftools
see: http://git-scm.com/docs/git-difftool

* add config reader for user-defined difftools
  * diff.tool
  * diff.guitool
  * difftool.prompt
  * difftool.trustExitCode
  * difftool.<tool>.path
  * difftool.<tool>.cmd
* add pre-defined difftools
* implemented "git difftool --tool-help" to verify config reader and
pre-defined difftools

Bug: 356832
Change-Id: Idde8fddbef61f3378ee565c6321570b3962d0e1d
Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
2021-12-08 10:43:00 +01:00
Matthias Sohn 30b79cd0e8 Prepare 6.0.1-SNAPSHOT builds
Change-Id: Iddb67ed9578293b83b8147aa18dd8319426f83d1
2021-11-29 17:37:27 +01:00