| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Previously the open/close accounting code used whole Pack object
synchronization for locking. Unfortunately, there are other unrelated
methods which use whole Pack object synchronization also, mostly to
avoid concurrent loading of these independent indices, and they do not
touch or need to coordinate with the open/close accounting data. During
heavy load when a new file appears after repacking the readFully()
threads could uselessly block on threads reading the reverse index.
These threads could have been reading from the Pack file instead of
waiting for the reverse index to be read. Use a new lock to make this
locking more fine grained to prevent the readFully() calling threads
from getting blocked in beginWindowCache() while the reverse index or
bitmaps are being loaded.
Change-Id: I7ac9067ca10cd6d6be0ab25148d99da3ace7ba36
Signed-off-by: Martin Fick <mfick@nvidia.com>
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I646edcba7809ab91d8e0a933796b4b5c81736232
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I4e4e203c0f6a2463adefd28d3965eaf44bd2e620
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Follow-up of I57b24ffb0b3 addressing a readability issue on the
variable names of the PackDirectory.handlePackError() method.
Change-Id: I877a45328e9b7026e66f300c363ea5c1625af157
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In the regular lifecycle of a Git repository, the packfiles
are constantly created and removed as part of repacking and pruning.
Lower the logging of disappearing packfiles to debug level
to reduce the SPAMing on logfile with warnings that should be
ignored as part of the normal repository life.
Change-Id: I57b24ffb0b32f7a64810cab47b5009f2bf89a6b8
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It's unnecessary to recompute this for retries.
Change-Id: I383ecfa25d795ba177dd5ce14d12b318e38daf9b
|
| |/ / / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
to simplify the implementation and shorten variable names.
Change-Id: I84c038e65263b7d0c38c4e90817ab8b07ad5c2da
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The current implementation throws an exception when a submodule is
updated for which the 'gitdir' still exists but the 'worktree' is
missing. The current implementation tries to clone the submodule but
fails as the 'gitdir' is not empty.
The commit adds:
- a check if the 'gitdir' is empty
- if the 'gitdir' is not empty:
- create a new '.git' file linking to the existing 'gitdir'
- fetch the submodule
- checkout the submodule unconditionally (ignore any configured
update mode)
- if the submodule is cloned checkout the submodule unconditionally
(ignore any configured update mode)
This change mimics the behavior of cgit.
Bug: jgit-79
Change-Id: Iffc8659d2a04d866a43815c78c7760c0f3d82640
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Don't accept short ref names anymore which is more predictable.
Change-Id: I5e7323c610c68b25facd6f2286456716d8e6cf1a
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
instead use Repository.getRefDatabase().getReflogReader().
Change-Id: I5e66a512c12e11d0ec3275fffde4adb8483430f2
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
to fix broken abstraction in FileRepository#getReflogReader(String).
How to get a ReflogReader depends on the chosen RefDatabase
implementation, hence the #getReflogReader methods should be there.
This also fixes a bug in FileRepository#getReflogReader(Ref) which
didn't work if FileReftableDatabase was used as RefDatabase since it
always returned the implementation only suitable for RefDirectory.
Change-Id: I0859990f9390ab96596b6c344966c687dfbbf167
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
See https://git-scm.com/docs/repository-version#_version_1
Change-Id: Ic71e55f5dfd4dacedabe54a5881a56b72659f3bc
Signed-off-by: youtirsin <youtirsin@qq.com>
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I3004d5b586b674e81cc76d0b01cef424d0b1f7f8
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: Iea1147f89fb14821b7d052d4e9c3397033dfade4
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: Ibf38c44d6893a1ce3baf83f8f0dbc06d1c8405ad
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I61259fc76454b473aee92dc96180219e5f4a4084
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I4e61af621b63b0715596b5a8c7d8eb985d64ce26
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We are moving from java.util.Date to java.time APIs.
Change-Id: I6f99d52c2e5bd4734ac1fe5378eed29b398e8c25
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* changes:
PackWriterBitmapPreparer: Use SystemReader.now() instead of deprecated method
TestRepository: Stop using deprecated methods in SystemReader
DfsGarbageCollector: Use SystemReader.now() instead of getCurrentTime()
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
SystemReader.getCurrentTime() is deprecated.
Change-Id: If4d683633a77eec9b4cc32daed00254fbaa3114b
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
getCurrentTime() is deprecated. Use now() that returns an Instant.
Change-Id: I107af03342e6815d97181d6dccd94e2fae2d3b21
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We are moving away from the old java.util.Date API to the
java.time API.
Add GitTimeParser#parseInstant to support this.
Change-Id: I3baeafeda5b65421dc94c1045b0ba576d4f79662
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We are moving away from the old java.util.Date API to the
java.time API.
Change-Id: I46b1f12192fe40d3bb740c3ce8632fffcd5fc5de
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I2a4e8c18378c1bcbf01c12a79d31cb5a2a050e97
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We are moving away from the old java.util.Date API to the
java.time API.
Change-Id: I904556f94cb28677cce565054bd2cd0f4fb2a096
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
since it's using java.util.Timezone. Instead promote usage of #getZoneId
which uses ZoneId from the preferred java.time API.
Change-Id: I15dee551a81acf0b8aafdbfcfcf200c0d38069f4
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We are moving away from the old java.util.Date api to the
java.time.Instant version. This class uses a deprecated constructor in
PersonIdent.
Use the new constructor for PersonIdent with Instant/ZoneId.
Change-Id: I50e2a643ad17a5c0722f87b1bb8abcad286745a5
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Errorprone suggest to use the more modern java.time.Instant instead of
the older Date API.
Offer a variant of RelativeDateFormatter#format method for Instants.
Change-Id: I536230327ec7b617958191fbe36f98b1294f6d2e
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
date() and timestamp() don't seem to have any use. I find only calls
to instant(). Mark as deprecated to remove usages of java.util.Date
and related classes.
Change-Id: I4e77c64678295b5ea83ada253c0e120f7bae5843
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
PendingCerts are ordered using PersonIdent#getWhen, which returns the
time as java.util.Date. That method is deprecated, as we are moving to
the new java.time.Instant API.
Sort the pending certs using the Instant
time (PersonIdent#getWhenAsInstant).
Take the chance to fix two minor warnings:
* the inserter is never used in the try{} block
* Unnecessary boxing in message format
Change-Id: I211e5319dc9865bd5a3468c7f5bbc141a6d5e71e
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Some signatures may not have a "created at" timestamp, or the tool used
to verify the signature does not report it. If we get none, do not
report anything about the signature creation time.
This can happen for instance if 'smimesign' is used for verifying x509
signatures.
Change-Id: I1a63aa62ffe173e00f27e8aea539b26cd40387c0
|
|\ \ \ \ |
|
| |\| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* stable-7.1:
WindowCache: share removal work among multiple threads
Update target platform version in maven build to 4.32 (2024-06)
Change-Id: Ic88bb210c5ea080b7553fadec2a1b8d71924365c
|
| | |\| |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* stable-7.0:
WindowCache: share removal work among multiple threads
Update target platform version in maven build to 4.32 (2024-06)
Change-Id: Idd6a8a2c3b5c6f53645dbe7144afb2e1e24e8ca3
|
| | | |\|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* stable-6.10:
WindowCache: share removal work among multiple threads
Update target platform version in maven build to 4.32 (2024-06)
Change-Id: I6ca4988e9ea1e9fc6b3382b40f18f3d9db7b7acb
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Split the removal process into blocks so that it can be shared by
multiple threads. This potential work sharing can provide 2
optimizations for removals:
1) It provides an opportunity for separate removal requests to be
consolidated into one removal pass.
2) It can reduce removing thread latencies by sharing the removal work
with other removing threads which otherwise might not have any work
to do due to their removal request being consolidated. This makes
the system more efficient and can actually reduce latencies as system
load increases due to pack removals!
The optimizations above are all achieved without blockng threads to wait
for other threads to complete (although naturally there are some
synchronization points), and while ensuring that no threads do more work
than if they were the only thread available to perform a removal.
Change-Id: Ic6809a8abf056299abde0f0c58c77aaf245a8df5
Signed-off-by: Martin Fick <mfick@nvidia.com>
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | | |
Annotate the new methods using Instant.
Change-Id: I1dc4eec59b44e784bcc151bd6a28347f6fd0de03
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
[errorprone] 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).
Move callers to the CommitTimeRevFilter java.time.Instant API
introduced in the parent commit.
Change-Id: Ib92c56ae09f1ad3df7628a8c61212eb84250700d
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Deprecate the methods using Date and offer the equivalent as Instant.
Keep an int with seconds as internal representation, as it seems more
efficient to compare than Instant.before/after.
Change-Id: Ie751ab5661c7dafaab58a16c219143b78092f84a
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* stable-7.1:
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: I772dd3b3ce7f27e33c1879ce21ec024cc2f9c52a
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* 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
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- comment empty code block
- suppress non-translatable text warning
Change-Id: Id49b4a56bbe5454edfe1ea8b79ceeaf51ceac370
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously the getOptional() call created an new Optional for its
element, and this appears to be somewhat expensive. During a time when a
server is heavily loaded because of a poorly maintained repository with
potentially 2K+ pack files, calls to Optionally.ofNullable() from within
the getOptional() method appeared extensively in the Stacktrace. Reduce
the getOptional() call overhead by storing an already created Optional
of the element instead of the element itself. This trades the extra
space of one extra reference for a potential speed gain in a hotspot.
Since the current users of Optionally.Hard reference objects
significantly larger than a single reference (and most users are likely
to be, else why would they be using an Optionally?), this is likely a
good tradeoff.
Change-Id: I7adccc915480cbb97a43dcbe074cfb620888c936
Signed-off-by: Martin Fick <mfick@nvidia.com>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When converting to Optionally, a threading bug was introduced, fix it.
The Optionally class itself is not thread safe, and previously it was
being called from idx() without any thread synchronization mechanism.
This was because previously the variable which held the cached index was
volatile. The Optionally<PackIndex> kept the volatile attribute, but
that only synchronizes the reference to the Optionally, and not the
element inside the Optionally. A clear() from another thread could thus
be missed by the idx() call, potentially allowing the idx() call to
interact poorly with the Optionally, potentially even causing a memory
leak. To fix this, extend the synchronized inside the idx() method to
the entire method. Then, additionally remove the now redundant Optional
fetch in idx() and the no longer needed volatile.
Change-Id: I6077e1aaed96c53200805b4c87a67afb49c2b373
Signed-off-by: Martin Fick <mfick@nvidia.com>
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: Ic6f0fd26153b47b4aeeec105bac431225d9bf8bf
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Sometimes a FileSystemException with "Stale file handle" can be thrown
while creating a FileSnapshot, likely because the file or directory was
deleted. Since NoSuchFileExceptions are already silenced, and the
FileSnapshot already handles all IOExceptions, there is likely no value
in seeing this info in the logs, treat these situation the same and
silence them also.
Change-Id: I922f4edf2d332cd704e60276f41a76df242f281c
Signed-off-by: Martin Fick <mfick@nvidia.com>
|