summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | | | * | | | | | | | Merge branch 'stable-6.1' into stable-6.2Matthias Sohn2023-04-156-13/+138
| | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.1: Remove blank in maven.config DirCache: support option index.skipHash Change-Id: Ief50a2ca8e5a8630627506f4d2142d62c0554615
| | | | | * | | | | | | Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2023-04-156-13/+138
| | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: Remove blank in maven.config DirCache: support option index.skipHash Change-Id: Idf757bcab0d7a65ea63504674a681170c6db2f94
| | | | | | * | | | | | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2023-04-156-13/+138
| | | | | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Remove blank in maven.config DirCache: support option index.skipHash Change-Id: I0cc3033b1876c8c691c2a6876206cd71fa07d2e0
| | | | | | | * | | | | Remove blank in maven.configMatthias Sohn2023-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maven 3.9.1 doesn't accept this whitespace. Change-Id: I0f6e3652b1e581615c370d35bc782184712ac922
| | | | | | | * | | | | DirCache: support option index.skipHashMatthias Sohn2023-03-285-12/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support the new option index.skipHash which was introduced in git 2.40 [1]. If it is set to true skip computing the git index checksum. This accelerates Git commands that manipulate the index, such as git add, git commit, or git status. Instead of storing the checksum, write a trailing set of bytes with value zero, indicating that the computation was skipped. Accept a skipped checksum consisting of 20 null bytes when reading the index since the option could have been set to true at the time when the index was written. [1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-indexskipHash Bug: 581723 Change-Id: I28ebe44c5ca1cbcb882438665d686452a0c111b2
* | | | | | | | | | | | Add protocol configuration to Amazon S3 transportPat Patterson2023-04-131-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, attempting to use the jgit Amazon S3 transport with an S3-compatible service that requires https (for example, Backblaze B2) results in an error: $ jgit push b2 fatal: amazon-s3://metadaddy-jgit/repos/test/objects: error in packed-refs This change adds a "protocol" property to the Amazon S3 transport configuration, defaulting to http, and uses that value when constructing the URL for the S3 service. Example configuration for Backblaze B2: accesskey: <Your B2 Application Key> secretkey: <Your B2 Application Key Id> acl: private protocol: https domain: s3.us-west-004.backblazeb2.com region: us-west-004 aws.api.signature.version: 4 Behavior after this change: $ jgit push b2 Counting objects: 3 Finding sources: 100% (3/3) Getting sizes: 100% (2/2) Compressing objects: 100% (37/37) Writing objects: 100% (3/3) Put pack-673f9bb.idx: 100% (1/1) To amazon-s3://.jgit_b2@metadaddy-jgit/repos/test * [new branch] main -> main Change-Id: I03bdbb3510fb81a416c225a720178f42eec41b21
* | | | | | | | | | | | [pgm] Implement git tag --contains optionMatthias Sohn2023-04-123-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I390bcd2c2c563d4b27e1369f09548be59ba7c111
* | | | | | | | | | | | ListTagCommand: implement git tag --containsMatthias Sohn2023-04-122-4/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I07e57ba098eace9656393837fad4cb3590f31b22
* | | | | | | | | | | | RevWalk: use generation number to optimize getMergedInto()kylezhao2023-04-122-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A commit A can reach a commit B only if the generation number of A is strictly larger than the generation number of B. This condition allows significantly short-circuiting commit-graph walks. On a copy of the Linux repository where HEAD is contained in v6.3-rc4 but no earlier tag, the command 'git tag --contains HEAD' of ListTagCommand#call() had the following peformance improvement: (excluded the startup time of the repo) Before: 2649ms (core.commitgraph=true) 11909ms (core.commitgraph=false) After: 91ms (core.commitgraph=true) 11934ms (core.commitgraph=false) Bug: 574368 Change-Id: Ia2efaa4e9ae598266f72e70eb7e3b27655cbf85b Signed-off-by: kylezhao <kylezhao@tencent.com>
* | | | | | | | | | | | DfsPackFile: Extract block aligment codeIvan Frade2023-04-111-30/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loading of pack, bitmap and commit-graph copy the same code to adjust the input stream buffering. Extract to a common function. Besides reusing the code, the name hints what it is doing. This block aligment seems unnecessary as the reading is from storage not dfs cache. The channel probably knows better. Left a TODO because I don't know the original intention. Change-Id: I18b77ae8189830fcd4d5932b6b5823b693ed6090
* | | | | | | | | | | | Merge branch 'stable-6.5'Matthias Sohn2023-04-066-12/+69
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.5: Ensure parsed RevCommitCG has derived data from commit-graph Downgrade maven-site-plugin to 3.12.1 Use wagon-ssh-external to deploy Maven site Change-Id: Ide721fb088fa04f6276ac495968a45e732f6e139
| * | | | | | | | | | | Ensure parsed RevCommitCG has derived data from commit-graphkylezhao2023-04-063-5/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a RevCommitCG was newly created and called #parseCanonical(RevWalk, byte[]) method immediately, its flag was marked as PARSED, but no derived data was obtained from the commit-graph. This is different from what we expected. Change-Id: I5d417efa3c42d211f19e6acf255f761e84d84450 Signed-off-by: kylezhao <kylezhao@tencent.com>
| * | | | | | | | | | | Downgrade maven-site-plugin to 3.12.1Matthias Sohn2023-03-303-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This may fix the current authentication failures happening when trying to deploy the jgit Maven site. Change-Id: I55d4706cd041d93194af48fac9e8bfcd067e2cac
| * | | | | | | | | | | Use wagon-ssh-external to deploy Maven siteMatthias Sohn2023-03-302-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using wagon-ssh stopped working. Try to use wagon-ssh-external instead. Bug: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/2818 Change-Id: I6f8fa771ddf9623b2e528f23f2ebdc871372ba2f
* | | | | | | | | | | | PatchApplierTest: specify charset to avoid warningJonathan Tan2023-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running bazel test //org.eclipse.jgit.test:org_eclipse_jgit_patch_PatchApplierTest results in a DefaultCharset error on my machine, which can be avoided by explicitly specifying a charset when calling getBytes on a string. In these tests, the charset used doesn't really matter, so go with UTF_8. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Change-Id: Id7721cc5b7ea650e77c2db47042715487983cae6
* | | | | | | | | | | | GcConcurrentTest: @Ignore flaky testInterruptGcJonathan Tan2023-04-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During my development of Id7721cc5b7ea650e77c2db47042715487983cae6, I have found this test to be flaky when run by CI. As a speculative fix, mark this test as @Ignore so it won't be run. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Change-Id: Idfe04d7f1fb72a772d4c8d249ca86a9c2eec0b1a
* | | | | | | | | | | | Merge "PatchApplier: Check for existence of src/dest files before any operation"Han-Wen NIenhuys2023-03-314-23/+131
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | PatchApplier: Check for existence of src/dest files before any operationNitzan Gur-Furman2023-03-314-23/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia3ec0ce1af65114b48669157a934f70f1e22fd37 Bug: Google b/271474227
* | | | | | | | | | | | | Revert "RefDirectory: Throw exception if CAS of packed ref list fails"Martin Fick2023-03-301-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9c33f7364d41956240818ba12d8b79d5ea846162. Reason for revert: This change was based on the false claim that the packedrefs file lock is held while the CAS is being done, but it is actually released before the CAS (the in memory lock is still held, however that does not prevent external actors from updating the packedrefs files and then another thread from subsequently re-reading it and updating the in memory packedRefList). Although reverting this change can cause the CAS to fail, it should not actually matter since the failure would indicate that another thread has already updated the in memory packedRefList to either the same version this thread was trying to update it too, or to a more recent version. Either way, failing the CAS is then appropriate and should not be problematic. Although this change reverts the code in the RefDirectory class, it keeps the "improvements" to the test so that it continues to pass reliably. The reason for the quotes around the word "improvements" is because I believe the test alteration actually dramatically changes the intent of the test, and that the original intent of the test is untestable with the GC and RefDirectory classes as is. Change-Id: I3acee7527bb542996dcdfaddfb2bdb45ec444db5 Signed-off-by: Martin Fick <quic_mfick@quicinc.com>
* | | | | | | | | | | | | RefDirectory.delete: Prevent failures when packed-refs is outdatedKaushik Lingarkar2023-03-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The in-memory copy of packed refs might be outdated by the time the packed-refs lock is acquired, so ensure the one read from disk is used after acquiring the lock to prevent commit packed-refs from throwing an exception. As a side-effect, since this updates the in-memory copy of packed-refs when it is re-read from disk, it can prevent other callers needing to re-read if it had changed. Change-Id: I724c866b330b397e955b5eb04b259eedd9911e93 Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
* | | | | | | | | | | | | RefDirectory.pack: Only rely on packed refs from diskKaushik Lingarkar2023-03-301-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since packed-refs is read from disk anyway, don't rely on the in-memory copy as that is racy and if outdated, could result in commit of pack-refs throwing an exception. This change also avoids a possible unnecessary double read of packed-refs from disk. Change-Id: I684a64991f53f8bdad58bbd248aae6522d11267d Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
* | | | | | | | | | | | | RefDirectory: Make pack() and commitPackRefs() voidKaushik Lingarkar2023-03-301-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no more callers (since Iae71cb3) of these methods that need the returned value. These methods should not have been returning anything in the first place as that can introduce bugs such as the one described in Iae71cb3. Change-Id: I1d083a91603da803a106cfb1506925a82c2ef809 Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
* | | | | | | | | | | | | Implement a snapshotting RefDirectory for use in request scopeKaushik Lingarkar2023-03-306-16/+417
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a SnapshottingRefDirectory class which allows users to get a snapshot of the ref database and use it in a request scope (for example a Gerrit query) instead of having to re-read packed-refs several times in a request. This can potentially be further improved to avoid scanning/reading a loose ref several times in a request. This would especially help repeated lookups of a packed ref, where we check for the existence of a loose ref each time. Change-Id: I634b92877f819f8bf36a3b9586bbc1815108189a Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
* | | | | | | | | | | | | Fix RefDirectoryTest.testGetRefs_LooseSorting_Bug_348834Kaushik Lingarkar2023-03-301-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the first attempt to read a ref is not expected to trigger a RefsChangedEvent, update the test to ensure 'lastNotifiedModCnt' is not 0 before we start the actual work. The test has been passing luckily because createBareRepository in setUp() happens to bump 'lastNotifiedModCnt'. Change-Id: Ibd981f677920e8c3b965aa742fe669c42b8c1c93 Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
* | | | | | | | | | | | | PackedBatchRefUpdate: Ensure updates are applied on latest packed refsKaushik Lingarkar2023-03-302-16/+29
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the window between refs being packed (via refDb.pack) and obtaining updates (via applyUpdates), packed-refs may have been updated by another actor and relying on the previously read contents may lead to losing the updates done by the other actor. To help avoid this, read packed-refs from disk to ensure we have the latest copy after it is locked and before committing updates to it. Bug: 581641 Change-Id: Iae71cb30830b307d0df929c9131911ee476c711c Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
* | | | | | | | | | | | Record my e-mail change in .mailmapThomas Wolf2023-03-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3bf867f2d91c92315d77015bdc87cd60e4ece78a Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | | | | | | | | | | [releng] Bump japicmp base versionThomas Wolf2023-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To 6.5.0.202303070854-r. Change-Id: Ifdf7c85871263ef3cc810aedc207b3598ba01d86 Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | | | | | | | | | | PatchApplier: missing @since, and minor formattingThomas Wolf2023-03-291-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I561ca2f522579571b29d3e6f35f24e201d1c1663 Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | | | | | | | | | | Merge "BasePackFetchConnection: support negotiationTip feature"Ivan Frade2023-03-283-2/+274
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | BasePackFetchConnection: support negotiationTip featureRonald Bhuleskar2023-03-283-2/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, Git will report, to the server, commits reachable from all local refs to find common commits in an attempt to reduce the size of the to-be-received packfile. If specified with negotiation tip, Git will only report commits reachable from the given tips. This is useful to speed up fetches when the user knows which local ref is likely to have commits in common with the upstream ref being fetched. When negotation-tip is on, use the wanted refs instead of all refs as source of the "have" list to send. This is controlled by the `fetch.usenegotationtip` flag, false by default. This works only for programmatic fetches and there is no support for it yet in the CLI. Change-Id: I19f8fe48889bfe0ece7cdf78019b678ede5c6a32
* | | | | | | | | | | | | PatchApplierTest: Remove test data with Apache licenseIvan Frade2023-03-284-747/+0
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some test data introduced in [1] includes code with Apache license. This triggers warnings in license analyzers. Remove the licensed files and the test case as a quick relief. We should restore the test with appropiate data in a follow-up change. [1] https://git.eclipse.org/r/c/jgit/jgit/+/197724 Change-Id: I42670dc7d994f77d2c7f2c2156bcf1e112374022
* | | | | | | | | | | | Merge "Fix PatchApplier error handling."Han-Wen NIenhuys2023-03-288-278/+374
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | Fix PatchApplier error handling.Nitzan Gur-Furman2023-03-288-278/+374
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. For general errors, throw IOException instead of wrapping them with PatchApplyException. The wrapping was moved (back) to ApplyCommand. 2. For file specific errors, log the errors as part of PatchApplier::Result. 3. Change applyPatch() to receive the parsed Patch object, so the caller can decide how to handle parsing errors. Background: this utility class was extracted from ApplyCommand on V6.4.0. During the extraction, we left the exception wrapping by PatchApplyException intact. This attitude made it harder for the callers to distinguish between the actual error causes. Change-Id: Ib0f2b5e97a13df2339d8b65f2fea1c819c161ac3
* | | | | | | | | | | | | Merge branch 'stable-6.5'Matthias Sohn2023-03-272-3/+11
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.5: Ensure FileCommitGraph scans commit-graph file if it already exists Change-Id: I5218ff5214222c7d6d96e452cf427eea1f20c316
| * | | | | | | | | | | | Ensure FileCommitGraph scans commit-graph file if it already existskylezhao2023-03-272-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When commit-graph file already exists in the repository, a newly created FileCommitGraph didn't scan CommitGraph until the file was modified, resulting in wrong result. Change-Id: Ic85676f2d3b6a88f3ae28d4065729926b6fb2f23 Signed-off-by: kylezhao <kylezhao@tencent.com>
* | | | | | | | | | | | | Merge branch 'stable-6.5'Matthias Sohn2023-03-230-0/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.5: GC: Close File.lines stream Change-Id: I498359a229b9bd3b62415870d3fdeae281977aa6
| * | | | | | | | | | | | Merge branch 'stable-6.4' into stable-6.5Matthias Sohn2023-03-231-2/+3
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.4: GC: Close File.lines stream Change-Id: I7e3a4b3671e779fd62062c4e10d224f432e39b54
| | * | | | | | | | | | | Merge branch 'stable-6.3' into stable-6.4Matthias Sohn2023-03-231-2/+3
| | |\ \ \ \ \ \ \ \ \ \ \ | | | | |/ / / / / / / / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.3: GC: Close File.lines stream Change-Id: I99455916d447f5dffed85e9a5c1d51b323f07a16
| | | * | | | | | | | | | Merge branch 'stable-6.2' into stable-6.3Matthias Sohn2023-03-231-2/+3
| | | |\ \ \ \ \ \ \ \ \ \ | | | | | |/ / / / / / / / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.2: GC: Close File.lines stream Change-Id: Id93b1933a5ce1ede9eb388c9fd54a4b3749694bf
| | | | * | | | | | | | | Merge branch 'stable-6.1' into stable-6.2Matthias Sohn2023-03-231-2/+3
| | | | |\ \ \ \ \ \ \ \ \ | | | | | | |/ / / / / / / | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.1: GC: Close File.lines stream Change-Id: Ia2be0b05ed860125a388b01d6c291832f08dd990
| | | | | * | | | | | | | Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2023-03-231-2/+3
| | | | | |\ \ \ \ \ \ \ \ | | | | | | | |/ / / / / / | | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.0: GC: Close File.lines stream Change-Id: I2f9e6da5584a40bb4b4efed0b87ae456f119d757
| | | | | | * | | | | | | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2023-03-231-2/+3
| | | | | | |\ \ \ \ \ \ \ | | | | | | | | |/ / / / / | | | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: GC: Close File.lines stream Change-Id: Ib473750e5a3ad3d74b0cb41f25052890f50a975c
| | | | | | | * | | | | | GC: Close File.lines streamXing Huang2023-03-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From File#lines javadoc: The returned stream from File Lines encapsulates a Reader. If timely disposal of file system resources is required, the try-with-resources construct should be used to ensure that the stream's close method is invoked after the stream operations are completed. Wrap File.lines with try-with-resources. Change-Id: I82c6faa3ef1083f6c7e964f96e9540b4db18eee8 Signed-off-by: Xing Huang <xingkhuang@google.com> (cherry picked from commit 172a207945da376b6b4143305aef2af56f7c42e2)
* | | | | | | | | | | | | GC: Close File.lines streamXing Huang2023-03-211-2/+3
| |_|_|_|_|_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From File#lines javadoc: The returned stream from File Lines encapsulates a Reader. If timely disposal of file system resources is required, the try-with-resources construct should be used to ensure that the stream's close method is invoked after the stream operations are completed. Wrap File.lines with try-with-resources. Signed-off-by: Xing Huang <xingkhuang@google.com> Change-Id: I82c6faa3ef1083f6c7e964f96e9540b4db18eee8 Signed-off-by: Xing Huang <xingkhuang@google.com>
* | | | | | | | | | | | Merge branch 'stable-6.5'Matthias Sohn2023-03-074-13/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.5: Rerun flaky tests 3 times Prepare 6.5.1-SNAPSHOT builds JGit v6.5.0.202303070854-r Ignore generated org.eclipse.jgit.benchmarks/dependency-reduced-pom.xml [sshd] Fix calculation of timeout in AbstractClientProxyConnector Silence API error raised for removed BranchRebaseMode#PRESERVE Change-Id: Ie615980c81371ee26b2395e67e026bbd17422fbd
| * | | | | | | | | | | Rerun flaky tests 3 timesMatthias Sohn2023-03-072-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can help to reduce time spent on rebuilds caused by flaky tests. Change-Id: I8f7831e470fd8aa065f0b8728f62f39734d05016
| * | | | | | | | | | | Prepare 6.5.1-SNAPSHOT buildsMatthias Sohn2023-03-0791-533/+533
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Idd9977ac08a339906e33beb73f57f8f6885ad86f
| * | | | | | | | | | | JGit v6.5.0.202303070854-rv6.5.0.202303070854-rMatthias Sohn2023-03-0791-125/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I8da37ead0bd527bc4990ed5f8d5d4fb4f4d5cf01
| * | | | | | | | | | | Ignore generated org.eclipse.jgit.benchmarks/dependency-reduced-pom.xmlMatthias Sohn2023-03-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8afe0e5128a63e0df02c5350772c942912408171
| * | | | | | | | | | | [sshd] Fix calculation of timeout in AbstractClientProxyConnectorStephan Wahlbrink2023-03-061-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation mixed nano seconds (elapsed) and milli seconds (remaining) without conversion. Change-Id: I9e1654afa47fa32c94808af3b2dd0418a372fb00