| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Ief504bf7f926d461e38186bf00711082d619fc08
|
|
|
|
| |
Change-Id: I525fc1258a729c36d63fdb3c8170e9f04ad55cec
|
|
|
|
|
| |
Change-Id: I4c75a58fd76102e773af4f1f8a1487d5e7ffc7cf
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* master:
Describe: add support for core.abbrev config option
Add a typed config getter for integers confined to a range
Remove odd prefix of PersonIdent test class
PersonIdent: Add ctors that accept Instant in addition to Date
Remove ignored potentiallyUnclosedCloseable check
Make precedence more explicit
[pgm] Add describe --abbrev option
Cap describe abbrev option
DescribeCommand: Add support for --abbrev=0
Change-Id: I1daa3501a38d57b628800fadb96b6b71eea8cbb3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If core.abbrev is unset or "auto" estimate abbreviation length like C
git does:
- Estimate repository's object count by only considering packed objects,
round up to next power of 2
- With the order of 2^len objects, we expect a collision at 2^(len/2).
But we also care about hex chars, not bits, and there are 4 bits per
hex. So all together we need to divide by 2; but we also want to round
odd numbers up, hence adding one before dividing.
- For small repos use at least 7 hexdigits
- If object database fails to determine object count use 7 hexdigits as
fallback
If it is set to "no" do not abbreviate object-ids.
Otherwise set it to the configured value capped to the range between 4
and length of an unabbreviated object-id.
Change-Id: I425f9724b69813dbb57872466bf2d2e1d6dc72c6
|
| |
| |
| |
| |
| |
| | |
Use Integer#MIN_VALUE to denote unset option.
Change-Id: I4d65f2434013111f25520c0ed2b9a9dc8123c6cf
|
| |
| |
| |
| | |
Change-Id: I05ede49902527c435691fb2c0f0d4da7ba077b7a
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Error Prone is flagging Date-API as obsolete and recommends to migrate
to Instant and LocalDate. Given that more JGit users starting to migrate
to new Time API, offer ctors that accept Instant type and also add new
getter that returns when attribute as Instant type.
Change-Id: I64a36bf40f191495c6889c1dff314ede06848880
|
| |
| |
| |
| |
| |
| |
| | |
potentiallyUnclosedCloseable currently is not checked and it creates
a warning when compiling with Maven.
Change-Id: I0715ead433270937f77f56a19aa203f8d6f5322f
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Errorprone was failing the build with: "[OperatorPrecedence]. Use
grouping parenthesis to make the operator precedence explicit"
Add parentheses to silence it.
Change-Id: I81f1f249e38fd2543f5412b3501b0179d0759f55
|
| |
| |
| |
| | |
Change-Id: I8adf2fad21db71b43266d3f274143eee6bc9dce2
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- minimum is 4 [1]
- maximum is length of a full ObjectId
[1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreabbrev
Change-Id: I145bde1a218f71b87b8d8260761dd0853770bb76
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Setting --abbrev=0 suppresses long format and only shows the closest tag
[1].
[1] https://git-scm.com/docs/git-describe#Documentation/git-describe.txt---abbrevltngt
Change-Id: Ifcf4d7786dd0f0fb0315d8093fdb54384ed9d5f9
|
| |
| |
| |
| | |
Change-Id: I30a89277373ad62c857151532942e135e34d1d0c
|
|/
|
|
|
| |
Change-Id: Idcd46e05ca3eec376f8ac83209dba0978e004f9a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The following warning was raised by Eclipse:
"At least one of the problems in category
'unused' is not analysed due to a compiler option being ignored"
The org.eclipse.jdt.core.compiler.problem.unusedTypeParameter compiler
option is set to ignore, hence the warning suppression is redundant.
Change-Id: I5fd6efc9968be133c71e95c53803c44310d75e85
|
|
|
|
| |
Change-Id: I904f9890428334bdf2971511e0b2681f3da5a82a
|
|
|
|
|
|
| |
Bug: 537883
Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
Change-Id: Ic52dcebc564bbb0d934cc3a6205704b7aeaee30e
|
|
|
|
|
|
|
|
|
| |
All the filtering in WorkingTreeIterator is for check-in, i.e., clean
filtering. The implementation was in some parts too general, passing
around an OperationType. But since it's always CHECKIN_OP, that's not
actually necessary.
Change-Id: I73f8bc059e485a073e456962868f52b3a3db4fc1
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
| |
and
- org.apache.httpcomponents.httpcore to 4.4.15.v20220209-2345
Change-Id: I0c7a8cf5a282596fe3d3dac422716480b3d76c83
|
|
|
|
|
|
|
|
| |
There is no need to load all refs if there are no wildcard push
refspecs. Load them lazily on the first wildcard refspec encountered
instead of loading them up-front.
Change-Id: I6d0e981f9ed4997dbdefeb7f83f37ff4f33e06a5
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
|
|
| |
Add ConfigConstants and expose branch.<name>.pushRemote in the
BranchConfig. Use the branch configuration and remote.pushDefault
if no remote is given explicitly. If nothing is configured, fall
back to "origin".
Bug: 578676
Change-Id: I6bb141ff02c8b04980ec34b26ef248b72614c3c9
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When no RefSpecs are given, PushCommand until now simply fell back to
pushing the current branch to an upstream branch of the same name. This
corresponds to push.default=current. Any setting from the git config
for push.default was simply ignored.
Implement the other modes (nothing, matching, upstream, and simple),
too. Add a setter and getter for the PushDefault so that an application
can force a particular mode to be used. For backwards compatibility,
use "current" as the default setting; to figure out the value from the
git config, which defaults to "simple", call setPushDefault(null).
Bug: 351314
Change-Id: I86c5402318771e47d80b137e99947762e1150bb4
Signed-off-by: Rolf Theunissen <rolf.theunissen@gmail.com>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
|
|
|
| |
We checked if the command instance is called but missed to set the flag
tracking if it actually was used.
Change-Id: I0f9fb85c47945a4d91eab01ec5e1abc1ab83332a
|
|
|
|
|
|
|
| |
SuppressWarnings is not used. Remove to avoid
warnings at compile time.
Change-Id: I84e3e57017cf9fd68d3377f866d4dd907ccde454
|
|
|
|
|
|
|
|
| |
Enhance the (unused!?) PushConfig; include a PushDefault enumeration.
Add simple tests for this PushConfig.
Bug: 351314
Change-Id: Ibc5656a2a1fccf70d00c5e15de8ed3dd8add6337
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|
|
|
| |
Change-Id: I091d82a26fb058eaa40c03e5cec1b004969d0894
|
|\
| |
| |
| |
| |
| |
| | |
* stable-6.0:
Stop initCause throwing in readAdvertisedRefs
Change-Id: I2266814c613fd81e9dfc722532ac3daa30ca66b5
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
* stable-5.13:
Stop initCause throwing in readAdvertisedRefs
Change-Id: I94251601aa7fae9cc65164eaddcf16471874b11e
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
BasePackConnection::readAdvertisedRefsImpl was creating an exception by
calling `noRepository`, and then blindly calling `initCause` on it. As
`noRepository` can be overridden, it's not guaranteed to be missing a
cause.
BasePackPushConnection overrides `noRepository` and initiates a fetch,
which may throw a `NoRemoteRepositoryException` with a cause.
In this case calling `initCause` threw an `IllegalStateException`.
In order to throw the correct exception, we now return the
BasePackPushConnection exception and suppress the one thrown by
BasePackConnection
Bug: 578511
Change-Id: Ic1018b214be1e83d895979ee6c7cbce3f6765f6f
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
According to Git LFS documentation, URLs with and without .git suffix
should be supported. By default, Git LFS will append .git/info/lfs to
the end of a Git remote URL. To build the LFS server URL it will use:
Git Remote: https://git-server.com/foo/bar
LFS Server: https://git-server.com/foo/bar.git/info/lfs
Git Remote: https://git-server.com/foo/bar.git
LFS Server: https://git-server.com/foo/bar.git/info/lfs
Fix the LfsConnectionFactory accordingly. Move a utility method to
add the ".git" suffix if not present yet from FileResolver to
StringUtils and use it.
Bug: 578621
Change-Id: I8d3645872d5f03bb8e82c9c73647adb3e81ce484
Signed-off-by: Nail Samatov <sanail@yandex.ru>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a way for the handler to tell whether the commit should generate a
Gerrit Change-Id. Augment the ModifyResult interface, and set the flag
on the CommitCommand.
This enables users to have a Change-ID be generated when squashing or
rewording commits. A possibly already existing Change-Id will remain
unchanged.
Bug: 440211
Change-Id: I66a72e0646876d162a7011235cca969e20acf060
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Set the string encoding when converting a byte array into String,
avoiding the build-time warning on platform-dependent encoding.
See https://errorprone.info/bugpattern/DefaultCharset
Change-Id: I1f920043a8f303da43a8278793c38453e8773d69
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
Change-Id: I196d58a813f7caa1965af4cf8e2f977ed4cdc350
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Repository wasn't closed in FetchAndPullCommandsRecurseSubmodulesTest.
This caused a "Resource leak: 'g' is never closed" warning during
compilation.
Bug: 578546
Change-Id: I591ef1e286bcd9a7103c016fd47015e77fa95cbb
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
CancellableDigestOutputStream resources are never closed in the tests.
This causes a "Resource leak: 'out' is never closed" warning
at compile time.
Suppress it by using a try with resources.
Bug: 578544
Change-Id: I0dc7de9162b8e3ac6fcaabe3002423f545baddb8
|
| | |
| | |
| | |
| | |
| | | |
Bug: 578543
Change-Id: Id7fb03c07c785ac0955e4969a9b781b707719749
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The method has been deprecated since 5.0.
Use getRefsByPrefix instead.
Bug: 534731
Change-Id: I5f1cfc1fd5ae49dc7a4ed3e039f23ed785d674f6
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
JGit accumulated in MESSAGE_FIXUP commit messages of a fixup sequence,
just like it did in MESSAGE_SQUASH, and on the last step of a sequence
of fixups used that file, after stripping all comment lines, as the
commit message. That also stripped any lines from the original commit
message that happened to start with the comment character.
This is not how this is supposed to work. MESSAGE_FIXUP must contain
the original commit message of the base commit that is amended, and
the file contains the verbatim commit message for the final fixup.[1]
Change the implementation accordingly, and add new tests.
[1] https://github.com/git/git/blob/df3c41adeb/sequencer.c#L86 ff.
Bug: 513726
Change-Id: I885a2b7f10d6c74460a8693aa6cbf867ee0494a1
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
| | |
| | |
| | |
| | |
| | |
| | | |
This fixes test failures on Windows.
Change-Id: I701fbeb99ffd7951514ae6eae8b28cceb9aebd9f
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Reload the stack _before_ trying to delete the files. This ensures we
don't trip over our own open file handles when deleting compacted
tables.
If there is another process reading the file, it may be impossible to
delete the compacted tables. In this case, ignore the failure.
For cleaning the garbage in this case, the protocol as described in
https://www.git-scm.com/docs/reftable#_windows should be implemented.
This is left for another commit.
Bug: 578454
Change-Id: I7aa43508450041eb9376d9f67a0262ff7cc53c73
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | | |
* changes:
RepoCommand: Offer to set extra files in the destination repository
RepoCommand: Move bare/regular superproject writing to their own classes
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We want to save in the destination repository what manifest created its
structure. This helps to detect and debug failures in the manifest ->
superproject translations. The src commit should be easily readable from
the superproject tip.
Offer an API to write a file in the destination repository. RepoCommand
callers (e.g. gerrit supermanifest plugin) can use this to add a
file with the repo/ref/hash of the manifest.
Alternatives considered to write the source repo/ref/hash:
* .gitattributes of the .gitmodules file. Some updates in the manifest
don't touch the .gitmodules (e.g. a linkfile change), so it can fall
out of sync.
* commit message. Caller would need to follow the commit history to
find the latest modification by repo command. This is not helpful
e.g. for build bots that want to get the value in one call.
Change-Id: I113662734a7ccd39cbc60b46ad3f73038c807682
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
RepoCommand parses the manifest to get a list of projects, clears up
conflicts and then writes to the superproject. The first steps are
common but the writing is completely different for bare or "regular"
(with working dir) repository.
Split writing to bare and regular repos into its own classes. This
simplifies RepoCommand class and makes clearer what happens on each side
(e.g. many options apply only to bare repos).
Change-Id: I256e15729bd53ee15fc56de88bce86a2edb2417a
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
On Windows eol=native, which is also the default if nothing else
overrides it, means convert text files to CRLF on checkout.
Adapt tests for this. Also don't fiddle with the real system property
"line.separator", use the mocked SystemReader for this.
Bug: 550111
Change-Id: Ie19b80fc543fa4970d6d9f181041c5f4d6ef3ed4
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|\ \ \ \ \
| |/ / / /
|/| | / /
| | |/ /
| |/| |
| | | |
| | | | |
* stable-6.0:
Fix warning: The value of the parameter otp is not used
Change-Id: I47996285c49ce85ab0bb835956a9ef58ed71de20
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Silence warning by removing unused argument to the beginCopyAsIs()
method.
Change-Id: I94e7ff1c61cf8b03752de2974baa24b9c061c163
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
FS.list() is supposed to return an empty array if the File given is not
a directory.
Bug: 550111
Change-Id: I245da5f1f2bdafd9dfb38fb8d7eff27d900cd5a8
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Escape paths when writing them to a config file to ensure they work
with backslashes and unusual characters.
Bug: 550111
Change-Id: Iedc5c0f2c0c02ac6cadf43cdae0f0d19578aed91
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|