| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: If1e74998a5d6495dafecd2e29b37dbf9018f99e6
|
|
|
|
|
| |
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ie69fa5fb5497f8bbb66c68b03eb161fb61bcddf1
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* stable-7.0:
Prepare 7.0.2-SNAPSHOT builds
JGit v7.0.1.202505221510-r
Prepare 6.10.2-SNAPSHOT builds
JGit v6.10.1.202505221210-r
AmazonS3: Do not accept DOCTYPE and entities
ManifestParser: Do not accept DOCTYPE and entities
Change-Id: I4506e4bf51225000418b15bf09df3287be26242a
|
| |
| |
| |
| | |
Change-Id: I80b330e687e96385176f00757dbf4491ce662dbc
|
| |
| |
| |
| |
| | |
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Id31e58be65f27c8f475f810b83491652be1266df
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-6.10:
Prepare 6.10.2-SNAPSHOT builds
JGit v6.10.1.202505221210-r
AmazonS3: Do not accept DOCTYPE and entities
ManifestParser: Do not accept DOCTYPE and entities
Change-Id: I699d57974d9ef2428355c59194c6becbc16828b7
|
| | |
| | |
| | |
| | | |
Change-Id: Id893557b6929718f8528ce50b0f7bdb23057aa15
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I60dd6d671f605c7cfaed747cc0fc1772115e5f37
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These open the door for XXE attacks [1] and manifest do not need them.
[1] https://en.wikipedia.org/wiki/XML_external_entity_attack
Change-Id: Ia79971e1c34afaf287584ae4a7f71baebcb48b6a
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-7.0:
Do not load bitmap indexes during directory scans
Fix calculation of pack files and objects since bitmap
Pack: no longer set invalid in openFail()
Change-Id: I480a52909a7f3ee771947c0fd447433e10a9b19b
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-6.10:
Do not load bitmap indexes during directory scans
Fix calculation of pack files and objects since bitmap
Pack: no longer set invalid in openFail()
Change-Id: I8846ad4745a360244f81518a028fed5f07086724
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fix a logic issue where pack files and objects created since the most
recent bitmap were incorrectly counted, ignoring their modification
time.
Since pack files are processed in order from most recent to oldest, we
can reliably stop counting as soon as we encounter the first bitmap. By
definition, all subsequent pack files are older and should not be
included in the count.
This ensures accurate repository statistics and prevents overcounting.
Bug: jgit-140
Change-Id: I99d85fb70bc7eb42a8d24c74a1fdb8e03334099e
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-7.0:
RevWalk: Add an isMergedIntoAnyCommit() method
Pack: separate an open/close accounting lock
http.server/BUILD: expose servlet resources as target
Change-Id: I25d3ffe86150d4d9e8a54634145cdbee34ea15fb
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-6.10:
RevWalk: Add an isMergedIntoAnyCommit() method
Pack: separate an open/close accounting lock
http.server/BUILD: expose servlet resources as target
Change-Id: Icda1b3dbc79c47d5dcc45932fe452fcf66e35657
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
RevWalk had a bulk isMergedIntoAny() method, however it worked only for
Refs. Add a similar method which works for RevCommits instead.
Unfortunately isMergedIntoAny() cannot be overloaded since java does not
include the generic types in Collections of method signatures, so the
method name needs to be more complicated to differentiate it from the
existing method.
Change-Id: I4f8f3a83058a186fafe3b37726e21c5074a6b8e1
Signed-off-by: Martin Fick <mfick@nvidia.com>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-7.0:
FileSnapshot: fix warnings
Optionally.Hard: avoid Optional creation on every use,
Pack: fix threading bug getting idx
Fix potential NPE in TreeWalk#getFilterCommandDefinition
Advertise "agent" capability when using protocol v2
FileSnapshot: silence "Stale file handle" exceptions
Change-Id: I4fdea7450f27eebfa7ae08002fd51e67b58bf6bb
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-6.10:
FileSnapshot: fix warnings
Optionally.Hard: avoid Optional creation on every use,
Pack: fix threading bug getting idx
Fix potential NPE in TreeWalk#getFilterCommandDefinition
Advertise "agent" capability when using protocol v2
FileSnapshot: silence "Stale file handle" exceptions
Change-Id: Ibe8bf9ad43cb1e56a5a5e4f4d9d5818334b2550a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The "agent" capability was not advertised by the server when executing
git-upload-pack over protocol v2.
This, in turn, prevented the clients from advertising its client agent
too, as documented [1]:
"The client may optionally send its own agent string by including the
agent capability with a value Y (in the form agent=Y) in its request to
the server (but it MUST NOT do so if the server did not advertise the
agent capability)."
When using jgit with Gerrit this had the effect of preventing the
logging of the git client agent in the sshd_log.
[1] https://git-scm.com/docs/protocol-v2#_agent
Bug: jgit-118
Change-Id: Ifb6ea65fde020425920338f7dd9cc683fed6a4a4
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-6.10:
PackDirectory: Filter out tmp GC pack files
Test advertised capabilities with protocol V0 and allow*Sha1InWant
Align request policies with CGit
Pack.java: Recover more often in Pack.copyAsIs2()
Change-Id: Ib301efa54aaf2196d764a0fc1f91f652b4d68396
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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: Id48af2bc19280f2dcb26aa8e8765cde8f2ce7a06
(cherry picked from commit 5583f6a10eafc8c2627e0fb4833cb8ffe422f69a)
|
| | |
| | |
| | |
| | | |
Change-Id: Ifc710a83cda50f1275cbbd5a828f92d95607f298
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I70f154dd1dc8571c5e2057d09d08d4a4d1b7ee37
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This command can be used to optimize storage of references.
For a RefDirectory database, it packs non-symbolic, loose refs into
packed-refs. By default, only the references under '$GIT_DIR/refs/tags'
are packed. The '--all' option can be used to pack all the references
under '$GIT_DIR/refs'.
For Reftable, all refs are compacted into a single table.
Change-Id: I92e786403f8638d35ae3037844a7ad89e8959e02
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This code came from GitDateParser and inherited these issues. It is a
good time to fix them:
* Use always {} in if and fors (eclipse guide)
* Use the more efficient EnumMap for the formatters
* variable.equals(CONSTANT) instead of CONSTANT.equals(var)
https://errorprone.info/bugpattern/YodaCondition
* private constructor to prevent instantiations of a utility classes
https://errorprone.info/bugpattern/PrivateConstructorForUtilityClass
* methods named in camelCase
* Use string.split(..., int)
https://errorprone.info/bugpattern/StringSplitter
* Initialize variable in first use
Change-Id: I0ae70ad9befc66fa9c057af135f2b0b2dab3869a
|
|\ \ \ \
| |/ / /
|/| / /
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-7.0:
DiffDriver: fix doc for rust built-in
DiffDriver: fix formatting of javadoc
Add numberOfObjectsSinceBitmap to RepoStatistics
Support built-in diff drivers for hunk header function names
Don't fail when trying to prune pack which is already gone
Rename numberOfPackFilesAfterBitmap to numberOfPackFilesSinceBitmap
Change-Id: I98beec1186132e749a749706f399237de7d7e45e
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-6.10:
DiffDriver: fix doc for rust built-in
DiffDriver: fix formatting of javadoc
Add numberOfObjectsSinceBitmap to RepoStatistics
Support built-in diff drivers for hunk header function names
Don't fail when trying to prune pack which is already gone
Rename numberOfPackFilesAfterBitmap to numberOfPackFilesSinceBitmap
Change-Id: I7f18e96cc98c56ee7c5e6256fe9e83957e733aa8
|
| | |\ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Introduce a numberOfObjectsSinceBitmap that contains the number of
objects stored in pack files and as loose objects created since the
latest bitmap generation.
Note that the existing
GcNumberOfPackFilesAfterBitmapStatisticsTest.java was renamed to
GcSinceBitmapStatisticsTest.java and extended to cover also this
statistic.
Change-Id: I8ae1db142ddfcd42a5a1d6da01bc67f695562e0e
|
| | |\|
| | | |
| | | |
| | | | |
stable-6.10
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Update the TestRepository.prunePacked so that it doesn't fail if a pack
to be pruned is already gone.
It is especially handy when the prunePacked function is called in
`TestRepository.packAndPrune` function after the repo moves on after
GC was performed.
Change-Id: I01b4ddbaddec1fdc24cfbb967e0edfe0de6c4b7c
|
| | |\ \
| | | |/
| | |/|
| | | | |
stable-6.10
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The regexes defined for each built-in driver will be used to determine
the function name for a hunk header. Each driver can specify a list of
regexes to negate and match. They can also define pattern compilation
flags if needed. These drivers only apply to text files with unified
patch type.
Following built-in drivers have been added:
- cpp
- dts
- java
- python
- rust
Support for more languages can be added as needed to match the cgit
implementation.
Change-Id: Ice5430bfed7e4aaf9f00e52e44402479984953c5
|
| | |/
| | |
| | |
| | |
| | |
| | | |
As sugested in I608011462f1.
Change-Id: If66226dd7b08ae768413fa614df5dcb6b44dc118
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-6.10:
Replace custom encoder Constants#encodeASCII by JDK implementation
Replace custom encoder `Constants#encode` by JDK implementation
Add `numberOfPackFilesAfterBitmap` to RepoStatistics
Enhance CommitBuilder#parent to tolerate null parent
Change-Id: If05b0d474c728b54cab9af2b7416be30b2754d1b
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
`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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Stop using the deprecated constructor with long/int for time/tz and
use instead Instant/ZoneId.
The code is still using the old constructor, but this verifies that we
are creating identical instances. We will update the code later.
Change-Id: I3844bf1e790e53e69a894cd697bddb31b755c2e6
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The constructor with long/int for time/tz is deprecated in favor of
Instant/ZoneId.
Update first the expectations in the tests to the new constructors, so
we know we are creating the same PersonIdents than before. We update
the code later, knowing there is no regression in e.g. format or
precision.
Change-Id: I05c759bdd4cf73b8afe79fae3c792f2f1300d1e6
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|