| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The existing DfsBlockCache uses a single table for all
extensions (idx, ridx, ...).
This change introduces an implementation of the table
interface that can keep extensions in different cache
tables.
This selects the appropriate cache to use for a specific
PackExt or DfsStreamKey's PackExt type, allowing the
separation of entries from different pack types to help
limit churn in cache caused by entries of differing sizes.
This is especially useful in fine-tuning caches and
influencing interactions by extension type.
For example, a table holding INDEX types only will
not influence evictions of other PackExt types and
vice versa.
The PackExtBlockCacheTable allowing setting the
underlying DfsBlockCacheTables and mappinh directly,
letting users implement and use custom DfsBlockCacheTables.
Change-Id: Icee7b644ef6b600aa473d35645469d6aa1bce345
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Based on deritative work done in Andre's work in [1].
This change focuses on adding support for reading the repository
state when branches are checked out using git's worktrees.
I've refactored original work by removing all unrelevant
changes which were mostly around refactoring to extract
i.e. constants which mostly created noise for a review.
I've tried to address original review comments:
- Not adding non-behavioral changes
- "HEAD" should get resolved from gitDir
- Reftable recently landed in cgit 2.45,
see https://github.com/git/git/blob/master/Documentation/RelNotes/2.45.0.txt#L8
We can add worktree support for reftable in a later change.
- Some new tests to read from a linked worktree which
is created manually as there's no write support.
[1] https://git.eclipse.org/r/c/jgit/jgit/+/163940/18
Change-Id: Id077d58fb6c09ecb090eb09d5dbc7edc351a581d
|
|\ \
| | |
| | |
| | | |
extensions"
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Parse configurations for tables containing a set of extensions,
defined in [core "dfs.*"] sections.
Parse configurations for cache tables according to configurations
defined in [core "dfs.*"] git config sections for sets of
extensions. The current [core "dfs"] is the default to any
extension not listed in any other table.
Configuration falls back to the defaults defined in the
DfsBlockCacheConfig.java file when not set on each cache
table configuration.
Sample format for individual cache tables:
In this example:
1. PACK types would go to the "default" table
2. INDEX and BITMAP_INDEX types would go to the
"multipleExtensionCache" table
3. REFTABLE types would go to the "reftableCache" table
[core "dfs"] // Configuration for the "default" cache table.
blockSize = 512
blockLimit = 100
concurrencyLevel = 5
(...)
[core "dfs.multipleExtensionCache"]
packExtensions = "INDEX BITMAP_INDEX"
blockSize = 512
blockLimit = 100
concurrencyLevel = 5
(...)
[core "dfs.reftableCache"]
packExtensions = "REFTABLE"
blockSize = 512
blockLimit = 100
concurrencyLevel = 5
(...)
Change-Id: I0e534e6d78b684832e3d3d269cee2590aa0f1911
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
DfsPackFile always uses the object size index if available. That is
the desired final state, but for a safe rollout, we should be able to
disable using the object size index.
Add an option (dfs.useObjectSizeIndex) to enable/disable the usage of
the object size index. False by default.
This changes the default from true to false. It only makes a different
for the DFS stack when writing of the index was explicitely
enabled. This is an optimization, so it shouldn't cause any
regression. Operators can restore previous behaviour setting
"dfs.useObjectSizeIndex" to true.
Change-Id: I44bf5a57e3942a4ecfe66d58bfa9175e99f96fcc
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Calculating the paths modified in a commit respect its parents is
taking undue amount of time in big trees.
Use ANY_DIFF filter, instead of #idEquals() inside the #next(). This
shorcuts the tree browsing earlier.
Change-Id: I318eee3ae817b7b9004d60bdb8d0f1bf19b9962d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To verify that we have the right paths between commits we are writing
the bloom filters, reading them and querying. The path diff
calculation is tricky enough for correctness and performance that
should be tested on its own.
Move the path diff calculation to its own class, so we can test it on
its own.
This is a noop refactor so we can verify later the steps taken in the
walk.
Change-Id: Ifbdcb752891c4adb08553802f87287de1155bb7c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Fields of an Error instance shouldn't be modifiable after its creation.
Adapt tests which were setting hh to null to skip asserting it.
Change-Id: I0f55c1d5cd529aa510029054e6f05bd2637d1bca
|
|
|
|
|
|
|
| |
This will let callers show a different error message or mark the
state as conflicting.
Change-Id: Id8eea614b6b8d54c62b49ffbac90599e6f4c5efa
|
|
|
|
|
|
|
|
| |
For deleted files, we want to keep erroring out even if conflicts
are allowed for the apply patch logic. The resulting file would
otherwise only consist of the patch.
Change-Id: I18defa627ad2223a3a917d2b0ee4189396732533
|
|\
| |
| |
| |
| |
| | |
* changes:
Remove unused API problem filters
Fix warning "Redundant specification of type arguments <Object>"
|
| |
| |
| |
| |
| |
| | |
Use a lambda to fix this and make the code easier to read.
Change-Id: I082ffb2073f86d21deb4b51a24e53de9371b765e
|
| |
| |
| |
| | |
Change-Id: Ie3ac82a8160c605e27ee3167e3640cd76b1b2a76
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some settings, we want to let users apply a patch that does
not cleanly apply and add conflict markers. In Gerrit, this is
useful when cherry picking (via Git patches) from one host to
another.
This commit takes a simple approach: If a hunk doesn't apply,
go to the pre-image line, treat all lines in pre-image length
as left side of the conflict and all context and newly added
lines as right side of the conflict.
Change-Id: I01411d7a32b3f3207097b26231909aae6b835650
|
|
|
|
|
|
| |
Left overs from https://review.gerrithub.io/c/eclipse-jgit/jgit/+/204984
Change-Id: I169ce2a008ca70267323fa4fb0f1e54981f1ec33
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are two failing tests when switching to JDK 21.
One failure is related to the changed behaviour related to the locale
providers. Adapt `GitDateFormatterTest` to changes in unicode [1].
Second failure related to changed behaviour in URL.openConnection(),
see: [2] for more details.
Before JDK 20, some of the parsing/validation performed by the JDK
built-in URLStreamHander implementations were delayed until
URL::openConnection or URLConnection::connect was called. Starting
JDK 20, some of these parsing/validations are now performed early,
i.e. within URL constructors.
IOW, the assumption made in HttpSupport.TesttestMalformedUri() isn't
met any more: providing mailformed URI to the URL ctor now throws an
exception starting with JDK 20. To rectify the problem, remove the
offending test.
Test plan:
To build with JDK 21 and run the tests locally:
$> bazel test --config=java21 //...
To build with JDK 21 and run the tests on RBE:
$> bazel test --config=remote21 --remote_instance_name=$PROJECT //...
[1] https://bugs.openjdk.org/browse/JDK-8304925
[2] https://bugs.openjdk.org/browse/JDK-8293590
Change-Id: I796de67f7945d5f1fa5e8146f4ec8cbe9ac7bd3e
|
|
|
|
|
|
|
|
|
|
| |
This fixes the warning in UploadPackHandleDeletedPackFileTest. line 116:
"Type safety: The method register(Object, Repository) belongs to the raw
type TestProtocol. References to generic type TestProtocol<C> should be
parameterized."
Change-Id: I5a74269f1af7369dd397dd0f1c3cd807c0351367
|
|
|
|
|
|
| |
See https://errorprone.info/bugpattern/ModifiedButNotUsed
Change-Id: I3bd3f865d50a26af6c594391de5adf35230c984f
|
|
|
|
|
|
| |
See https://errorprone.info/bugpattern/CatchAndPrintStackTrace
Change-Id: I7a6698293d1485f384c275bf7e4dcddc529af4a1
|
|
|
|
|
|
| |
See https://errorprone.info/bugpattern/FutureReturnValueIgnored
Change-Id: I7225fd6388ce70ed5eea9e61b29bd10e1a927acb
|
|
|
|
|
|
| |
See https://errorprone.info/bugpattern/BadImport
Change-Id: I24e5a7a4a64d8b3cf2cc3d394090ce90e849f9f9
|
|
|
|
|
|
| |
See https://errorprone.info/bugpattern/UseCorrectAssertInTests
Change-Id: Iffde63ac795ad30c3e7774764cb8189cb089ed86
|
|
|
|
|
|
| |
See https://errorprone.info/bugpattern/ProtectedMembersInFinalClass
Change-Id: I5993093ca012f091dfe8ee1f2099b9596c2ee697
|
|
|
|
|
|
| |
See https://errorprone.info/bugpattern/CatchFail
Change-Id: If1c637a420c4e669a5bdbe4abcefc5c3a2b3a43b
|
|
|
|
|
|
| |
See https://errorprone.info/bugpattern/UnusedVariable
Change-Id: I75d7602af31ed7d3264d2beab2d159cfbf29e7cb
|
|
|
|
|
|
| |
See https://errorprone.info/bugpattern/LongLiteralLowerCaseSuffix
Change-Id: I139eadef5d66dfed2952ba9e1c91b3fe83259e97
|
|
|
|
|
|
| |
See https://errorprone.info/bugpattern/JdkObsolete
Change-Id: Id105e2695eb64523bd217f507bf95f909bc6b348
|
|
|
|
|
|
| |
See https://errorprone.info/bugpattern/UnnecessaryParentheses
Change-Id: I783fd24286ec1bd55efbf21d05758465f4af87ee
|
|
|
|
|
|
|
|
|
|
|
| |
1) If the file was marked as binary by git attributes, we should add the
path to conflicts if content differs in OURS and THEIRS
2) If the path is a file in OURS, THEIRS and BASE and if it is a binary
in any one of them, no content merge should be attempted and the file
content is kept as is in the work tree
Bug: jgit-14
Change-Id: I9201bdc53a55f8f40adade4b6a36ee8ae25f4db8
|
|
|
|
| |
Change-Id: I5bbd04754f5f29299a7b9a58a3717e3f615199d0
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change I4e4ff67fb279edbcc3461496b132cea774fb742f introduced new
behaviour that also rewrote parents in a RevWalk if no TreeFilter was
set. This led to unexpected behaviour when users were fetching from
chromium.googlesource.com. I added a few more tests to better describe
the behaviour of RevWalk in regards to rewriting parents.
Change-Id: I1a5e5f8a1de9d8dd0e3664918ac010644b3ef87b
Signed-off-by: Max Haslbeck <haslbeck@google.com>
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Closes https://github.com/eclipse-jgit/jgit/issues/38.
The previous code computed the boundaries of the base part of
conflict hunks using line numbers computed for the 'ours' and
'theirs' revisions, leading to incorrect boundaries.
This only affects the presentation of merge conflicts in diff3
mode (which is probably not used a lot yet on Gerrit).
Successful merges are unaffected.
Change-Id: I173c79bf5797896dc854791d6d05cb3f035726f4
Signed-off-by: Antonin Delpeuch <antonin@delpeuch.eu>
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: Ibb9b2f8fc0f5180728904f243bf372f8a233383d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The expected behavior of TreeRevFilter when filtering multiple file
paths is to include commits that changed at least one of the given
paths; only skipping them if they did not change any of the given
paths. The current changedPathFilter utilization logic is skipping a
commit if there exists at least one given path that the commit did not
change, disregarding the rest of the given paths.
Enforcing all given paths to be checked by the changedPathFilter, only
skipping a commit if changedPathFilter return negative on all given
paths.
Signed-off-by: Xing Huang <xingkhuang@google.com>
Change-Id: Ib7a9e496b37ec737722fbf33c5d0f05d5d910a8d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
getPathsBestEffort() is a method in the TreeFilter class
to retrieve file paths specified by the caller. PathFilterGroup do not
propagate the paths of their subfilters as it does not implement the
getPathsBestEffort() method, resulting in the caller only getting an
empty list of paths.
Override getPathsBestEffort() in PathFilterGroup to propagate subfilter
values.
Signed-off-by: Xing Huang <xingkhuang@google.com>
Change-Id: I76bf08795360abc0874a7c258636d4f37da35060
|
|/
|
|
|
|
|
|
|
|
|
| |
By default, CommitGraphLoader reads the readChangedPaths flag from
SystemReader ignoring the values set at repo-level.
Read the value of the property from the repo configuration and pass it
to CommitGraphLoader.
Signed-off-by: Xing Huang <xingkhuang@google.com>
Change-Id: I34c807714c5a7573769ba9d611457aa107006244
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current code reads the bitmap index from the pack extension and loads
all bitmaps into memory, with its IO and memory cost. We could
consider to store the bitmaps on e.g. a database and load them on
demand.
Abstract the loading of the PackBitmapIndex in an interface that can
be implemented with other backends.
Change-Id: Ib5f64d05954708ea5325feea7088a8df229b36a5
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
getObjectSize reads the size from the first bytes of the object in the
pack, using IO. For blobs and depending on the configuration, the size
could be available in the object size index.
Try to get the size from the object size index if available. Read from
the pack otherwise.
Note that GC uses #getObjectSize from the existing pack to write the
next object size index.
Change-Id: Ia999290c06d061cb53aa8c0a2b28b1a9761567ef
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit db5ce6b5c24408ae27eb6fa0b6289d51b129baeb.
Reason to revert: This change utilizes the RewriteGenerator even in
absence of a path, making the walk lengthy.
Change-Id: I5ffa6e8fead328191348c1e46828bf8c75ae1e42
|
|\ \
| |/
|/|
| |
| |
| |
| |
| | |
* stable-6.8:
Delete org.eclipse.jgit.ssh.apache.agent/bin/.project
Allow to discover bitmap on disk created after the packfile
Change-Id: I08095dfaefb963876d993383cb35acc6b75d7691
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-6.7:
Delete org.eclipse.jgit.ssh.apache.agent/bin/.project
Allow to discover bitmap on disk created after the packfile
Change-Id: I01749bae6f46d1a8ebd25b890e667cc092f3a659
|