| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| | |
Bug: jgit-107
Change-Id: I54856849df7c6959ccc2b6f10de510950d3da401
|
| |
| |
| |
| | |
Change-Id: I4efccd72bd567d42e739ee330e26c6b04d5c5c01
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From errorprone: Date has a bad API that leads to bugs; prefer
java.time.Instant or LocalDate.
Replace the long with milliseconds and int with minutes offset with an
Instant and a ZoneOffset. Create new constructors and deprecate
variants with Date, milliseconds and minute offsets.
When comparing instances of PersonIdent truncate the timestamp precision
to 1 second since git commit timestamps are persisted with 1 second
precision [1].
[1] https://git-scm.com/docs/git-commit#Documentation/git-commit.txt-Gitinternalformat
Change-Id: Id4ba1f108e1ba0bfcdd87ba37c67e2d3cc7d254f
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replacement of GitDateParser that uses java.time classes instead of
the obsolete Date. Updating GitDateParser would have been a mess of
deprecation and methods with confusing names, so I opted for writing a
parallel class with the new types.
Some differences:
* The new DateTimeFormatter is thread-safe, so we don't need the
LocalThread cache
* No code seems to use other locale than the default, we don't need to
cache per locale either
Change-Id: If24610a055a47702fb5b7be2fc35a7c722480ee3
|
|
|
|
|
|
|
|
|
| |
Update the TestRepository.prunePacked so that it doesn't fail if a pack
to be pruned is already gone. It is especially handy when prunePacked
function is called in `TestRepository.packAndPrune` function after repo
moves on after the GC was performed.
Change-Id: I01b4ddbaddec1fdc24cfbb967e0edfe0de6c4b7c
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
CacheHotMap is currently only set on the base DfsBlockCacheConfig and is
not propagated down to PackExt specific caches.
Because CacheHotMap is set from a method call rather than from Configs,
this change sets per-PackExt CacheHotMap configs on PackExt cache
configs both when DfsBlockCacheConfig#setCacheHotMap(...) is called, and
when DfsBlockCacheConfig#configure(...) is called after setCacheHotMap.
The outer DfsBlockCacheConfig keeps the full CacheHotMap for the same
reason that the CacheHotMap config is propagated in both setCacheHotMap
and configure: the order of operations setting the configuration from
Configs and calling setCacheHotMap is not guaranteed.
Change-Id: Id9dc32fedca99ecc83c9dc90c24d9616873a202e
|
|\ \ |
|
| |/
| |
| |
| |
| |
| | |
As sugested in I608011462f1.
Change-Id: If66226dd7b08ae768413fa614df5dcb6b44dc118
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Date API is full of major design flaws and pitfalls and should be
avoided at all costs. Prefer the java.time APIs, specifically,
java.time.Instant (for physical time) and java.time.LocalDate[Time]
(for civil time). [1]
Replace the Date with Instant in the
DfsGarbageCollector#setReflogExpire method.
[1] https://errorprone.info/bugpattern/JavaUtilDate
Change-Id: Ie98e426e63621e8bef96c31bca56aec0c8eef5a6
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
* stable-7.1:
Add missing @since 7.1 to UploadPack#implies
ResolveMerger: Allow setting the TreeWalk AttributesNodeProvider
Add Union merge strategy support
Change-Id: Ib1c1725578e522c88f80f050d221a517bf012017
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-7.0:
ResolveMerger: Allow setting the TreeWalk AttributesNodeProvider
Add Union merge strategy support
Change-Id: I15674134f4c73ac2de514d4fac4a36fca7ed7b07
|
| | |\
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* stable-6.10:
ResolveMerger: Allow setting the TreeWalk AttributesNodeProvider
Add Union merge strategy support
Change-Id: I0d768d793effd1deabb4807446a4f8c10a82ad74
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Allow users to specify the `union` strategy in their .gitattributes file
in order to keep lines from both versions of a conflict [1].
[1] https://git-scm.com/docs/gitattributes.html#Documentation/gitattributes.txt-union
Change-Id: I74cecceb2db819a8551b95fb10dfe7c2b160b709
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The manifest spec [1] defines a "dest-branch" attribute. Parse its
value and store it in the RepoProject. Also, create a getter/setter
for dest-branch.
[1] https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md#Element-project
Change-Id: I8ad83b0fec59d2b0967864e4de4fefde4ab971ff
(cherry picked from commit 47fd412affd8d7578606ae9b3015a911b71b13ed)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Project entries in the manifest with a specific sha1 as revision can
use the "upstream" field to report the ref pointing to that sha1. This
information is very valuable for downstream tools, as they can limit
their search for a blob to the relevant ref, but it gets lost in the
translation to .gitmodules.
Save the value of the upstream field when available/relevant in the
ref field of the .gitmodules entry.
Change-Id: I14a2395925618d5e6b34be85466e32f5ef8fbf6e
(cherry picked from commit 48465f84014904edddcdd48258c67bc19555d4c3)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The manifest spec [1] defines the "upstream" attribute: "name of the
git ref in which a sha1 can be found", when the revision is a
sha1. The parser is ignoring it, but RepoCommand could use it to
populate the "ref=" field of pinned submodules.
Parse the value and store it in the RepoProject.
RepoProject is public API and the current constructors are not
telescopic, so we cannot just add a new constructor with an extra
argument. Use plain getter/setters.j
[1] https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md#Element-project
Change-Id: Ia50b85b95bfd3710f9fbda2050be5950dd686941
(cherry picked from commit 1dd6324d4b4d9596813b18a44e315295f559ea12)
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: Ibaddbad3677636452cad4e8b7ce0a58b1a78f833
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ibae7987afb2459fa77c6b151606fbf69fc8a8f49
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Currently the compactor is not writing the object size index for
packs. As it is using PackWriter to generate the packs, it needs to
explicitely call the writes of each extension.
Invoke writeObjectSizeIndex in the compactor. The pack writer will
write one if the configuration says so.
Change-Id: I8d6bbbb5bd67bfc7dd511aa76463512b1e86a45d
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Errorprone warns about this deprecated classes. The recommendation is
stop using SecurityManager all together.
The Security Manager is deprecated and subject to removal in a future
release. There is no replacement for the Security Manager. See JEP 411
[1] for discussion and alternatives.
[1] https://openjdk.org/jeps/411
Change-Id: I3c67136e97d13cf24b85e41d94408631c26e8be8
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
JGit reftable writer/compator knows how to prune the history, but the
DfsGarbageCollector doesn't expose the time limit.
Add a method to DfsGarbageCollector to set the reflog time limit.
This value is then passed to the reftable compactor. Callers usually
pass here the value from gc.reflogExpire.
The reflog block length is stored in 24 bits [1], limiting the size to
16MB. I have observed that in repositories with frequent commits,
reflogs hit that size in 6-12 months.
[1] https://git-scm.com/docs/reftable
Bug: jgit-96
Change-Id: I8b32d6d2b2e1d8af8fb7d9f86225d75f1877eb2f
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make available all underlying cache table stats for the used cache table
implementation.
The existing cache table stats implementation only allows a "global"
view of the cache table statistics; it does not differentiate between
all possible underlying cache tables used.
This change allows callers to get the block cache stats broken down
per underlying table. These cache stats are intended to be used for
monitoring all cache tables independently.
Existing usages of getBlockCacheStats now make use of
AggregatedBlockCacheStats.fromStatsList to aggregate the list of
BlockCacheStats into a single BlockCacheStats instance.
Change-Id: I261b3f2849857172397657e5c674b11e09807f27
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
PackWriter assumes that the primary index goes to a file in a well-known
format. This cannot accomodate implementations in other storages or
formats (e.g. in a database).
Create an interface to write the index (PackIndexWriter). This interface
will be implemented by the existing pack index writer classes
(PackIndexWriterV1 etc.).
As the "PackIndexWriter" name was used by the previous superclass of the
file writers, we rename that class to "BasePackIndexWriter".
Change-Id: Ia7348395315e458fc7adc75a8db5dcb903e2a4a1
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Introduce a `numberOfPackFilesAfterBitmap` that contains the number of
packfiles created since the latest bitmap generation.
Notes:
* the `repo.getObjectDatabase().getPacks()` that obtains the list of
packs (in the existing `getStatistics` function) uses
`PackDirectory.scanPacks` that boils down to call to
`PackDirectory.scanPacksImpl` which is sorting packs prior returning
them therefore the `numberOfPackFilesAfterBitmap` is just all packs
before the one that has bitmap attached
* the improved version of `packAndPrune` function (one that skips
non-existent packfiles) was introduced for testing
Change-Id: I608011462f104fc002ac527aa405f492a8a4b0c2
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The stats interface has an implementation in the interface itself and another inside the PackExtBlockCache class. This asymmetry gets on the way to implement stats-per-table later.
Make DfsBlockCacheStats (the stats of a single table) a top-level class and create an aggregator class to combine multiple stats. This makes the stats classes mirror the table classes structure (singles tables + composite).
This change is part of a refactor to support providing detailed stats
breakdowns for cache implementations using multiple table instances
while keeping the existing "aggregated" view of cache stats.
Change-Id: I79c11e4ea24afe4b449efdbb47bc81eed363ffd3
|
|\ \ \ \ |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This will write out configuration values on a line by line basis to a
given PrintWriter.
Primary usage is as a semi-formatted debug print of the configuration
values used by dfs block cache.
Change-Id: I96724262245e4aa3423734a8b10de83322c4f89f
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The advertised capabilities with protocol V0 were untested
leading to potential regressions when advertising what
SHA1 should or should not be on the list of capabilities.
Verify that allow-tip-sha1-in-want and allow-reachable-sha1-in-want
are properly advertised with the allow*Sha1InWant is set in
jgit.config.
Change-Id: I99d062a5a630b02ca3d1fe83bf6cdf3c284ae941
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently difference in binary files during merge will cause them to be
added to unmergedPaths regardless of whether ignoreConflicts is true.
This creates an issue during merging with strategy "RECURSIVE", as it
makes it impossible to create a virtual commit if there is a difference
in a binary file. Resulting in the
CONFLICTS_DURING_MERGE_BASE_CALCULATION error being thrown.
This is especially problematic, since JGit has a
rather simplistic rules for considering file binary, which easily leads
to false positives.
What we should do instead is keep OURS. This will not lead to silently
ignoring difference in the final result. It will allow creation of
virtual merge-base commit, and then the difference would be presented
again in the final merge results. In essense it only affects what's
shown as BASE in 3-way merge.
Additionally, this is correct because
- It's consistent with treatment of other unmergeable entities, for
example Gitlinks
- It's consistent with behaviour of CGit:
- https://git-scm.com/docs/gitattributes#Documentation/gitattributes.txt-binary
states on diffs in binary OURS is picked by default.
- In code: https://git.kernel.org/pub/scm/git/git.git/tree/merge-ll.c#n81
- ignoreConflicts in CGit afterwards ignores all issues with content
merging https://git.kernel.org/pub/scm/git/git.git/tree/merge-ort.c#n5201
We also adjust the behaviour when .gitattributes tell us to treat the
file as binary for the purpose of the merge.
We only change the behaviour when ignoreConlicts = true, as otherwise
the current behaviour works as intended.
Change-Id: I2b69f80a13d250aad3fe12dd438b2763f3022270
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The addition of a name will help show statistics broken down per inner
cache table when more than one cache table is used.
The name configuration is obtained from the config subsection name
prefixed by `dfs`, or `dfs` for the base case.
Change-Id: Ia16c794f094d756441b779e3b1f1a3c992443509
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Adds the usage of PackExtBlockCacheTable to the
DfsBlockCache, replacing the current DfsBlockCacheTable
when PackExtCacheConfigurations exists.
When no PackExtCacheConfigurations exists the current
DfsBlockCacheTable implementation will be used.
Change-Id: I42222a0cb43785baba907a49077dd9874d19d891
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
At construction time, PackWriter receives the PackConfig as a
parameter or reads it from the repository. The only exception is when
the constructor receives only a reader (no repo nor conf
provided?!).
Remove PackWriter(Reader) and let callers be explicit what conf to
use. This makes clearer the flow of conf in the PackWriter.
Change-Id: If12e122797ffc8c44fc3c435ca1b000ca016645b
|
| |/ /
|/| |
| | |
| | | |
Change-Id: Iba206a2d4645fc275cd2cd1cb3ae965b8ceafb28
|
| | |
| | |
| | |
| | | |
Change-Id: I5a6a9e398d8b81bf7bd0afbd6c82116d4472a349
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I86507936091e6f7af7588835722672ff2668a205
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
LocalDiskRepositoryTestCase#create(boolean,boolean)"
This reverts commit 3682611cef41ade46cf5ac194f0674b46367a395.
Reason: removing this deprecated method caused a ton of warnings about
closing an already closed Repository when running tests.
Change-Id: I3e9f224c55c167f92dad39caabfab5e43cf54cfb
|
| | |
| | |
| | |
| | | |
Change-Id: I28d00d7a70af0fbb76e237dd77b929508720ecdb
|
| | |
| | |
| | |
| | | |
Change-Id: I9eff2d405b5302753ff2ec1d0eab431bdba69fe0
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* master:
walks: Remove deprecated #createReachabilityChecker() method
RepoCommand.RemoteReader: Remove @Deprecated method
ReachabilityChecker: Remove @Deprecated method
UploadPack: Remove @Deprecated classes and methods
ObjectId: Add method to read an ObjectId from a ByteBuffer
DfsPackFile: re-add metrics for bitmap index loads
Change-Id: I383c9784ced95dfd58f01454fd13b086b180d462
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Some storages return data in a convenient ByteBuffer wrapper, but
there is no straigh-forward method to read ObjectIds from it.
Add ObjectId#fromRaw(ByteBuffer) to read object ids from byte buffers.
Change-Id: Ia3b244005e4d9a613294f5ad9dab3b8e7bc3d7df
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I75b7d36181a0d404d4e3dca17b9e436892d97b42
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I35e7527c6c555cd57fce14889412fa2fd6beab88
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I5fcad7a824c4a320683d11da52c4e2035231f85d
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: Ie9d5da0c065ba0118927d530ed589952fb3b2c2b
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: Ibe7edc5e53c3d467e0e6144a3f8a32989f1ac6af
|