| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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: I3384e7405cadf063e7b0dd25468a8651c45628ac
|
|
|
|
|
| |
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Id188a6cdc2db63c961f0b9338e6ae56d58853dff
|
|
|
|
|
| |
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: I3128b2e4bbbed97adde90f7a47e15175e63e97f5
|
|
|
|
| |
Change-Id: I64f6d6a0599cbab462dca236c00e6f3314b2a810
|
|
|
|
|
| |
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ie3d08213e00fcfe1fc34a39021dd99f27e0abc1f
|
|
|
|
|
| |
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Change-Id: Ia525790e0b4c9011b29768d2b9727cb48b21ba84
|
|
|
|
|
|
|
| |
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
|