| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| | |
* 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>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
Change-Id: I196d58a813f7caa1965af4cf8e2f977ed4cdc350
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \ \
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | | |
* 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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
C git also does so. Note that currently the comment character is
hard-coded as the hash '#' throughout JGit.
Bug: 548529
Change-Id: I4a5597694082a9e5b07412b365cfaf41fa034cfa
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Respect git config commit.cleanup for rewording. Note that by default
this is CleanupMode.STRIP, whereas before this change, JGit would take
the reworded message verbatim.
Squashing was the only place in JGit where it automatically and
unconditionally removed comment lines from commit messages. In other
places it didn't do so, and client code needed to do so.
Unconditionally removing comments is problematic if the commit message
_should_ contain some line starting with a hash, which can easily occur
with the way Github, Gitlab, and other git web servers link to issues
or PRs: they all allow the short-hand "#<number>".
Introduce a new InteractiveHandler2 extension interface, which can
return the edited message _and_ a clean-up mode. This way, client code
can decide on its own how to clean the message, and if JGit shouldn't
do any further cleaning, it can return CleanupMode.VERBATIM. Or
CleanupMode.WHITESPACE. (In the case of SQUASH, it is then of course
the client's responsibility to remove the squash comment lines.)
If the old InteractiveHandler interface is used, CleanupMode.STRIP is
applied unconditionally for squashing, as before.
Bug: 578173
Change-Id: Ia0040c247884e684587dd45d6cb85f8b72a4b876
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use CommitConfig.CleanupMode to implement git commit --cleanup. Add
setters for the clean-up mode, the comment character, and for the
default default clean-up mode.
Behavior of existing client code is unchanged as the default clean-up
mode is set to "verbatim". To use git config defaults, one can call
setCleanupMode(CleanupMode.DEFAULT). The default comment character
is hard-coded as '#' for now, as in other parts of JGit. Implementing
full support for core.commentChar shall be done in a separate change.
Bug: 553065
Change-Id: I470785e464a762d3f409f163f1cbdbb98dd81aaf
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add an enumeration for the possible values, and a method to resolve the
"default" value. Give CommitConfig a static method to process a text
according to a given clean-up mode and comment character.
(The core.commentChar is not yet handled by JGit; it's hard-coded as #.)
Bug: 553065
Change-Id: If6e384522275f73b713fbc29ffcaa1753c239dea
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the walk is created via ObjectWalk(Repository), it creates a new
ObjectReader. This reader was closed only on dispose(). If such an
ObjectWalk was used in a try-with-resource statement the reader might
not get closed.
Bug: 578458
Change-Id: I1be31829dc466530f23006a53c29b657fd5fb410
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Let's be lenient and accept hunk lines terminated by CR-LF, too, not
just lines terminated by LF.
Bug: 550111
Change-Id: I7f796df666300ab56cc6c07f22eda45fbf4c941e
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Parse the value from the ssh config and if set use it when connecting.
Change-Id: I85b44c9468a5027602375706612c46ea7a99b2bd
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add parsing of the config. Implement the SSH agent protocol for adding
a key. In the pubkey authentication, add keys to the agent as soon as
they've been loaded successfully, before even attempting to use them
for authentication. OpenSSH does the same.
Bug: 577052
Change-Id: Id1c08d9676a74652256b22281c2f8fa0b6508fa6
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
OpenSSH has (for legacy reasons?) the option of specifying the default
environment variable directly, instead of using ${SSH_AUTH_SOCK}. Make
sure the plain variable name is not taken as a relative path name.
Bug: 577053
Change-Id: If8f550dffc43887254f71aa0b487c50fa14d0627
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Handle the 'none' value, and change the value to select Pageant to
something that looks like an absolute UNC path name to avoid it's
handled as an relative path name.
Bug: 577053
Change-Id: I4ccf047abbc1def50e2782319e4fa7c744069401
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Checking the cancelled status and keeping a digest of the written data
is useful for other output streams. e.g. to write commit-graphs.
Pull up that functionality to a superclass, so it can be reused.
Change-Id: I177b50be09c4ea631e7a144cc6127085ec2ca411
Signed-off-by: kylezhao <kylezhao@tencent.com>
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Enhance cache performance monitoring for large data such as pack and
bitmap indexes. Provide details about what is loaded and evicted from
cache like total number of cache hits, time in cache before eviction.
Add a custom consumer to report loading events and eviction events when
enabled.
Signed-off-by: Alina Djamankulova <adjama@google.com>
Change-Id: I5739325db7ff7ec370e4defd8f7e46f1c3f5d2dd
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I575cd5e1ecd326514a8bb4c36a86a2dc71ba5457
|
|\ \ \ \ \
| |_|/ / /
|/| | / /
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* stable-6.0:
[bazel] Skip ConfigTest#testCommitTemplatePathInHomeDirecory
[errorprone] Fix InfiniteRecursion error in RecordingLogger
[errorprone] Suppress Finally error in ObjectDownloadListener
[errorprone] Fix implicit use of default charset in FileBasedConfigTest
[errorprone] Suppress FutureReturnValueIgnored in FileRepository#autoGc
Change-Id: I08d58c8f3f04e3a920da43b5fb252b1654c2b33c
|
| |\ \ \
| | | | |
| | | | |
| | | | | |
FileRepository#autoGc" into stable-6.0
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Ignore the FutureReturnValueIgnored warning for the unused return value
of #gc.
Change-Id: I4e7a2f85d404962c01726f9a1d079fe4a6430a1b
|
|\| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* stable-6.0:
UploadPack v2 protocol: Stop negotiation for orphan refs
Complete update to servlet api 4.0.0
Change-Id: I55ab6e8fd4a76e4313e37b12f9fc5d5e4b84a681
|
| |\ \ \ \
| | |/ / /
| |/| | /
| | | |/
| | |/|
| | | |
| | | | |
* stable-5.13:
UploadPack v2 protocol: Stop negotiation for orphan refs
Change-Id: I6a9ed8338ffbf5363e48d640a2c4209e4e503549
|
| | |\ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* stable-5.12:
UploadPack v2 protocol: Stop negotiation for orphan refs
Change-Id: Ib43068c32d9cb8effe4b873396391dc3c9197a6e
|
| | | |\ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* stable-5.11:
UploadPack v2 protocol: Stop negotiation for orphan refs
Change-Id: I5db432bd416cfa8d3dd295bdce63e31d5f160a8a
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The fetch of a single orphan ref (for example Gerrit meta ref:
refs/changes/21/21/meta) did not stop the negotiation so client
had to advertise all refs. This impacts the fetch performance
on repositories with a large number of refs (for example on
Gerrit repository it takes 20 seconds to fetch meta ref
comparing to 1.2 second to fetch ref with parent).
To avoid this issue UploadPack, used on the server side,
now checks if all `want` refs have parents, if not this
means that client doesn't need any extra objects, hence
the server responds with `ready` and finishes the
negotiation phase.
Bug: 577937
Change-Id: Ia3001b400b415d5cf6aae45e72345ca08d3af058
|
|\| | | | |
| |_|_|_|/
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* stable-6.0:
Use FileSnapshot without using configs for FileBasedConfig
Change-Id: Icc38ce20c1c791c8cf0ca3dcab46b1151f122805
|
| |\| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* stable-5.13:
Use FileSnapshot without using configs for FileBasedConfig
Change-Id: Iaff40b144aea9ad5e6d0fa6b448ad7d527992832
|
| | |\| |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* stable-5.12:
Use FileSnapshot without using configs for FileBasedConfig
Change-Id: I6a0266cbcaaf18d0d60f0abecb5434fd919c44b7
|
| | | |\|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* stable-5.11:
Use FileSnapshot without using configs for FileBasedConfig
Change-Id: I4e241860c2ca50750e22c2761c515c9895688c55
|
| | | | |\
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* stable-5.10:
Use FileSnapshot without using configs for FileBasedConfig
Change-Id: Ie3f2d05aeb1aa04af707cfafef5780349be4d981
|
| | | | | |\
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* stable-5.9:
Use FileSnapshot without using configs for FileBasedConfig
Change-Id: I4f954c48ad6e8ff18826fdc72d225bff3e3ae2d9
|
| | | | | | |\
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
* stable-5.8:
Use FileSnapshot without using configs for FileBasedConfig
Change-Id: Ic97d38fc85daa00297abbfa186f83b779966e7ef
|
| | | | | | | |\
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
* stable-5.7:
Use FileSnapshot without using configs for FileBasedConfig
Change-Id: If9cc2f2bae5dbead7a38218828da461540be942e
|
| | | | | | | | |\
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
* stable-5.6:
Use FileSnapshot without using configs for FileBasedConfig
Change-Id: I274d46d73cc896dcfde6e24c69c71f33aaa78d20
|
| | | | | | | | | |\
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
* stable-5.5:
Use FileSnapshot without using configs for FileBasedConfig
Change-Id: If904289feecd1e0d8466c1fb998f160f14d54b61
|
| | | | | | | | | | |\
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | | |
* stable-5.4:
Use FileSnapshot without using configs for FileBasedConfig
Change-Id: I84e11bdaa9306e23212dac9d8670557a18d40107
|
| | | | | | | | | | | |\
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
* stable-5.3:
Use FileSnapshot without using configs for FileBasedConfig
Change-Id: I3d8eb2fa721e1a791db47a2342acc690ced01715
|