aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 6.4.0-SNAPSHOT buildsMatthias Sohn2022-09-1491-529/+529
| | | | Change-Id: I47ca5f1d0263caa0bfc7c303042360c6c5ac4dec
* Fix typo in FetchV2Request javadockylezhao2022-09-141-1/+1
| | | | | Change-Id: I905dda15e1b7f5e431816d3fbb01a1672e5fc786 Signed-off-by: kylezhao <kylezhao@tencent.com>
* Merge branch 'stable-6.3'Matthias Sohn2022-09-12105-1470/+1078
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.3: Prepare 6.3.1-SNAPSHOT builds JGit v6.3.0.202209071007-r JGit v6.3.0.2022009070944-r [merge] Fix merge conflicts with symlinks Update DEPENDENCIES for 6.3.0 Update tycho to 2.7.5 Revert "Adds FilteredRevCommit that can overwrites its parents in the DAG." Revert "Option to pass start RevCommit to be blamed on to the BlameGenerator." Prepare 6.3.0-SNAPSHOT builds JGit v6.3.0.202208161710-m3 Change-Id: Ia9430fb516dca795e25064a190704b70689af364
| * Prepare 6.3.1-SNAPSHOT buildsMatthias Sohn2022-09-1291-529/+529
| | | | | | | | Change-Id: I44e159eca4131880d74d3078060e7e20f9b5ce76
| * JGit v6.3.0.202209071007-rv6.3.0.202209071007-rMatthias Sohn2022-09-0791-125/+125
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: Iea3fae9f6f6c5fb0a79f7684334a3e0059738c4f
| * JGit v6.3.0.2022009070944-rMatthias Sohn2022-09-0791-125/+125
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I3cc78dbcf8c7970e80bf1499751611110ec2b30b
| * [merge] Fix merge conflicts with symlinksThomas Wolf2022-09-073-53/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous code would do a content merge on symlinks, and write the merge result to the working tree as a file. C git doesn't do this; it leaves a symlink in the working tree unchanged, or in a delete-modify conflict it would check out "theirs". Moreover, previous code would write the merge result to the link target, not to the link. This would overwrite an existing link target, or fail if the link pointed to a directory. In link/file conflicts or file/link conflicts, C git always puts the file into the working tree. Change conflict handling accordingly. Add tests for all the conflict cases. Bug: 580347 Change-Id: I3cffcb4bcf8e336a85186031fff23f0c4b6ee19d Signed-off-by: Thomas Wolf <twolf@apache.org>
| * Update DEPENDENCIES for 6.3.0Matthias Sohn2022-09-061-27/+27
| | | | | | | | Change-Id: Ie057e4c94a102113fc9026d9773657984530c9c6
| * Update tycho to 2.7.5Matthias Sohn2022-09-061-1/+1
| | | | | | | | Change-Id: I5ef981cf9f01cc8493dc6178938819f5e086f26a
| * Merge branch 'master' into stable-6.3Matthias Sohn2022-09-064-186/+110
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Move WorkTreeUpdater to merge package WorkTreeUpdater: use DirCacheCheckout#StreamSupplier DirCacheCheckout#getContent: also take InputStream supplier WorkTreeUpdater: remove safeWrite option Change-Id: I8be570dbc4ad0d0b46046b85cbda24c3adcba170
| * | Revert "Adds FilteredRevCommit that can overwrites its parents in theMatthias Sohn2022-09-068-523/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DAG." This reverts commit 6297491e8adb85e43d60ffe75fb71f335e733449. This is done as a quick fix for the failure of egit tests caused by the introduction of FilteredRevCommit. Bug: 580690 Change-Id: Ia6b651dd11b0a4b02d5e52247eb4bf13adf94e27
| * | Revert "Option to pass start RevCommit to be blamed on to theMatthias Sohn2022-09-062-337/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BlameGenerator." This reverts commit 5747bba48b22a11beba8ebe0caf13a53d4ca96f2. This is done as a quick fix for the failure of egit tests caused by the introduction of FilteredRevCommit. Bug: 580690 Change-Id: Ia0178bc2de4fc825a81207bbd7979bf3a386c955
| * | Merge branch 'master' into stable-6.3Matthias Sohn2022-09-0535-372/+1228
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Update Orbit to R20220830213456 for 2022-09 BaseSuperprojectWriter: report invalid paths as manifest errors ApplyCommand: fix ApplyResult#updatedFiles WorkTreeUpdater: rename metadata maps WorkTreeUpdater#Result: hide data members Add javadoc on RevCommit Option to pass start RevCommit to be blamed on to the BlameGenerator. WorkTreeUpdater: re-format and clean-up Adds FilteredRevCommit that can overwrites its parents in the DAG. Change-Id: Ie92037b78b54c4ab290db80034e3192b1f90a1fc
| * | | Prepare 6.3.0-SNAPSHOT buildsMatthias Sohn2022-08-1791-125/+125
| | | | | | | | | | | | | | | | Change-Id: Ie398b651c5308ec86812bf01fcc563d3e679c828
| * | | JGit v6.3.0.202208161710-m3v6.3.0.202208161710-m3Matthias Sohn2022-08-1691-125/+125
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I0954d11a1f35eff196b157df3aa8386476c48a7e
* | | | Merge "DfsBundleWriter: Add test case about GC_REST pack."Ivan Frade2022-09-071-1/+28
|\ \ \ \ | |_|_|/ |/| | |
| * | | DfsBundleWriter: Add test case about GC_REST pack.yunjieli2022-09-071-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a test case to make sure that the bundle writer writes objects in GC_REST packs as well. Signed-off-by: Yunjie Li <yunjieli@google.com> Change-Id: Iba4d88c573aa1cda4505afbe2b83581a09a343df
* | | | Merge changes I888f313f,I98de155c,I2efa9a6d,Ifa79dac2Matthias Sohn2022-09-064-186/+110
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | * changes: Move WorkTreeUpdater to merge package WorkTreeUpdater: use DirCacheCheckout#StreamSupplier DirCacheCheckout#getContent: also take InputStream supplier WorkTreeUpdater: remove safeWrite option
| * | | Move WorkTreeUpdater to merge packageHan-Wen Nienhuys2022-09-062-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids making it public with the associated costs for backward compatibility guarantees. Change-Id: I888f313f3854deace8d4cd92f354a6ef0d3b5460
| * | | WorkTreeUpdater: use DirCacheCheckout#StreamSupplierHan-Wen Nienhuys2022-09-063-130/+16
| | | | | | | | | | | | | | | | | | | | | | | | This avoids having to introduce the StreamLoader bridging class. Change-Id: I98de155c458745236df24d6323eabed5061e7f8c
| * | | DirCacheCheckout#getContent: also take InputStream supplierHan-Wen Nienhuys2022-09-062-27/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets us use DirCacheCheckout for routines that want to write files in the worktree that aren't available as a git object. DirCacheCheckout#getContent takes a InputStream supplier rather than InputStream: if filtering fails with IOException, the data is placed unfiltered in the checkout. This means that the stream has to be read again, from the start. Use it in this way in ApplyCommand. This use is incorrect, though: the same InputStream is returned twice, so if the read to be retried, the stream will return 0 bytes. It doesn't really matter, because in either case, the SHA1 will not match up, and the patch fails. Change-Id: I2efa9a6da06806ff79b155032fe4b34be8fec09e
| * | | WorkTreeUpdater: remove safeWrite optionHan-Wen Nienhuys2022-09-062-24/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was added in Ideaefd5178 to anticipate on writing files for ApplyCommand, but we are keeping WorkTreeUpdater private to the merge package for now. Change-Id: Ifa79dac245e60eb7a77eaea4cc1249222e347d38
* | | | Update Orbit to R20220830213456 for 2022-09Matthias Sohn2022-09-0519-31/+31
| |/ / |/| | | | | | | | Change-Id: Iab04fd9e72102abe3d9d927a5cae4a1df2001aa2
* | | BaseSuperprojectWriter: report invalid paths as manifest errorsIvan Frade2022-08-232-1/+26
|/ / | | | | | | | | | | | | | | | | | | An invalid path in the manifest (e.g. '.') is reported by DirCache in a runtime exception. In server context this becomes a 500 instead of a user error. Wrap the runtime invalid path exception into a checked ManifestErrorException that caller can handle. Change-Id: I61a2104922765506ae232334891057bb06141d97
* | ApplyCommand: fix ApplyResult#updatedFilesHan-Wen Nienhuys2022-08-232-12/+13
| | | | | | | | | | | | | | | | On executing a copy, mark the destination as updated. On executing a rename, mark both source and destination as updated. Change-Id: Ied5b9b0e5a14eac59a06cdd0961e25e143f50ff0
* | WorkTreeUpdater: rename metadata mapsHan-Wen Nienhuys2022-08-231-10/+10
| | | | | | | | Change-Id: I8ff3803da8fc13377d11c2dc5523e9e32d0650cb
* | WorkTreeUpdater#Result: hide data membersHan-Wen Nienhuys2022-08-232-10/+23
| | | | | | | | | | | | This is the standard across JGit. Change-Id: Ie52ad7000d8725657b33dd4f3adcc05ab9666875
* | Merge "WorkTreeUpdater: re-format and clean-up"Han-Wen NIenhuys2022-08-181-221/+265
|\ \
| * | WorkTreeUpdater: re-format and clean-upThomas Wolf2022-08-171-221/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reformat using the standard JGit formatter settings. Clean-ups: * Try to improve javadoc. * Remove blindly copy-pasted "@since 6.1" annotations. * Get rid of private method nonNullNonBareRepo(); it's not needed. * Simplify method nonNullRepo(), and annotate as @NonNull. * Rename setInCoreFileSizeLimit() to getInCoreFileSizeLimit(). Change-Id: Ib1797e7cf925d87554307468330971e8ab2e05e9 Signed-off-by: Thomas Wolf <twolf@apache.org> Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* | | Add javadoc on RevCommitRonald Bhuleskar2022-08-171-0/+5
| | | | | | | | | | | | Change-Id: Ib413154fe52983286cb6307862a7373af4fec6e8
* | | Option to pass start RevCommit to be blamed on to the BlameGenerator.Ronald Bhuleskar2022-08-172-39/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | This can allow passing a FilteredRevCommit which is the filtered list of commit graph making it easier for Blame to work on. This can significantly improve blame performance since blame can skip expensive RevWalk. Change-Id: Ie127cb710d004079e9f53a5802130afdb49a7de1
* | | Adds FilteredRevCommit that can overwrites its parents in the DAG.Ronald Bhuleskar2022-08-168-53/+523
| |/ |/| | | | | Change-Id: I1ea63a3b56074099688fc45d6a22943a8ae3c2ae
* | Merge changes Ib6689f54,I3b5c22eeMatthias Sohn2022-08-162-31/+2
|\ \ | |/ |/| | | | | | | * changes: Remove unused API problem filters Add missing @since tag for RevCommit#parents introduced in 61b4d105e4
| * Remove unused API problem filtersMatthias Sohn2022-08-121-31/+0
| | | | | | | | Change-Id: Ib6689f545585bd59b8fc06ca3a104080021424d6
| * Add missing @since tag for RevCommit#parents introduced in 61b4d105e4Matthias Sohn2022-08-121-0/+2
| | | | | | | | Change-Id: I3b5c22eea7d0af5464c7df7a7cd855ea08029853
* | DirCacheCheckout: load WorkingTreeOptions only onceThomas Wolf2022-08-145-42/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous code loaded the WorkingTreeOptions afresh for every single file being checked out. This checked the git config (all three files, repo, user and system config) for having been modified every time. These checks can be costly, for instance on Windows, or if one of the three config files is not on a local disk, or on an otherwise slow storage. Improve this by loading the options and thus checking the git config only once before the checkout. Bug: 579715 Change-Id: I21cd5a808f9d90b5ca2d022f91f0eeb8ca26091c Signed-off-by: Thomas Wolf <twolf@apache.org>
* | WorkTreeUpdater: Fix unclosed streamsThomas Wolf2022-08-141-12/+20
| | | | | | | | | | | | | | | | | | | | | | 1. A TemporaryBuffer.LocalFile must be destroyed to ensure the temporary file gets deleted on disk. 2. TemporaryBuffer.openInputStream() may be used only after TemporaryBuffer.close(). 3. The caller of DirCacheCheckout.getContent() is responsible for closing the OutputStream! Change-Id: I46abb0fba27656a1026858e5783fc60d4738a45e Signed-off-by: Thomas Wolf <twolf@apache.org>
* | Merge "Fix API errors caused by 23a71696cd"Matthias Sohn2022-08-143-6/+41
|\|
| * Fix API errors caused by 23a71696cdMatthias Sohn2022-08-123-6/+41
| | | | | | | | | | | | | | | | | | | | | | | | - add missing @since 6.3 for new protected field workTreeUpdater and new class WorkTreeUpdater - suppress API errors caused by removing/adding protected fields and methods We follow OSGi semantic versioning which allows breaking implementers in minor versions which are e.g. subclassing a public class. Change-Id: I28f0d7b4fdd9a1f0fbc6b137d6c68dda9fe3c11e
* | Fix adding symlinks to the index when core.symlinks=falseThomas Wolf2022-08-132-0/+47
|/ | | | | | | | | | With core.symlinks=false, symlinks are checked out as plain files. When such a file is re-added to the index, and the index already contains a symlink there, add the file as a symlink. Previous code changed the index entry to a regular file. Bug: 580412 Change-Id: I5497bedc3da89c8b10120b8077c56bc5b67cb791 Signed-off-by: Thomas Wolf <twolf@apache.org>
* Merge "Provide encoding to String#getBytes()"Han-Wen NIenhuys2022-08-091-1/+2
|\
| * Provide encoding to String#getBytes()Han-Wen Nienhuys2022-08-081-1/+2
| | | | | | | | | | | | Fixes ErrorProne complaint. Change-Id: I706b225f98187bf5f86999ed5342d0072e57e314
* | Merge changes Ideaefd51,I6c347393Han-Wen NIenhuys2022-08-095-427/+889
|\ \ | | | | | | | | | | | | | | | * changes: Reapply "Create util class for work tree updating in both filesystem and index." ResolveMerger: add coverage for inCore file => directory transition
| * | Reapply "Create util class for work tree updating in both filesystem and index."Nitzan Gur-Furman2022-08-084-427/+856
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5709317f71ccaf26eceaa896150f203879b634b8. Add a bugfix for deletions in ResolveMergers instantiated with just an ObjectInserter as argument. Original change description: Create util class for work tree updating in both filesystem and index. This class intends to make future support in index updating easier. This class currently extracts some logic from ResolveMerger. Logic related to StreamSupplier was copied from ApplyCommand, which will be integrated in a following change. Co-authored-by: Nitzan Gur-Furman <nitzan@google.com> Co-authored-by: Han-Wen Nienhuys <hanwen@google.com> Change-Id: Ideaefd51789a382a8b499d1ca7ae0146d032f48b
| * | ResolveMerger: add coverage for inCore file => directory transitionHan-Wen Nienhuys2022-08-081-0/+33
| |/ | | | | | | Change-Id: I6c3473932eb418a036f5943c78e619184559ef3a
* / Provide default shallowCommits getter and setter in ObjectDatabaseRonald Bhuleskar2022-08-083-32/+15
|/ | | | | | | | | | | | | | I649db9ae679ec2606cf7c530b040f8b6b93eb81a added a default implementation for getShallowCommits and setShallowCommits to DfsObjDatabase, for the convenience of any implementers that define subclasses. But we forgot that some implementers inherit from ObjectDatabase directly instead. Move the default getter and setter to the base class so that such callers do not need source changes to unbreak their build. This also lets us update the api_filters to reflect that this is no longer an API-breaking change. Change-Id: I5dcca462eb306e511e57907b7d9264d51b3f3014
* Revert "Create util class for work tree updating in both filesystem and index."Jonathan Nieder2022-08-054-855/+426
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5151b324f4605b1091ac5843dcc1f04b3996f0d1. It is producing NullPointerExceptions during merges, causing Gerrit's acceptance tests to fail: com.google.gerrit.extensions.restapi.RestApiException: Cannot rebase ps [...] at com.google.gerrit.server.api.changes.RevisionApiImpl.rebase(RevisionApiImpl.java:280) at com.google.gerrit.acceptance.api.change.ChangeIT.rebaseChangeBase(ChangeIT.java:1584) Caused by: com.google.gerrit.server.update.UpdateException: java.lang.NullPointerException: repository is required at com.google.gerrit.server.update.BatchUpdate.executeUpdateRepo(BatchUpdate.java:588) [...] Caused by: java.lang.NullPointerException: repository is required at org.eclipse.jgit.merge.Merger.nonNullRepo(Merger.java:128) at org.eclipse.jgit.merge.ResolveMerger.addDeletion(ResolveMerger.java:380) at org.eclipse.jgit.merge.ResolveMerger.processEntry(ResolveMerger.java:553) at org.eclipse.jgit.merge.ResolveMerger.mergeTreeWalk(ResolveMerger.java:1224) at org.eclipse.jgit.merge.ResolveMerger.mergeTrees(ResolveMerger.java:1174) at org.eclipse.jgit.merge.ResolveMerger.mergeImpl(ResolveMerger.java:299) at org.eclipse.jgit.merge.Merger.merge(Merger.java:233) at org.eclipse.jgit.merge.Merger.merge(Merger.java:186) at org.eclipse.jgit.merge.ThreeWayMerger.merge(ThreeWayMerger.java:96) at com.google.gerrit.server.change.RebaseChangeOp.rebaseCommit(RebaseChangeOp.java:360) Change-Id: Idf63de81666d0df118d2d93c4f6e014e00dc05b8
* Provide a default implementation for set/get shallowCommits on DfsObjDatabaseRonald Bhuleskar2022-08-051-0/+16
| | | | | | Jgit change https://git.eclipse.org/r/c/jgit/jgit/+/193329 adds an implementation for get/set shallow commits in ObjectDatabase. This failed gerrit's acceptance tests since there is no default implementation for them in DfsObjDatabase. Change-Id: I649db9ae679ec2606cf7c530b040f8b6b93eb81a
* Merge "Revert "Option to pass start RevCommit to be blamed on to the ↵Terry Parker2022-08-032-337/+39
|\ | | | | | | BlameGenerator.""
| * Revert "Option to pass start RevCommit to be blamed on to the BlameGenerator."Ronald Bhuleskar2022-08-032-337/+39
| | | | | | | | | | | | | | | | | | | | This reverts commit 59e8bec6e7705a89b5d0b9c6ac004b323ffa16b0. Reason for revert: The change in https://git.eclipse.org/r/c/jgit/jgit/+/194354 broke the egit test [1]. Calling c.getShortMessage() causes an NPE. [1] https://ci.eclipse.org/egit/job/egit.gerrit/2711/ Change-Id: Iaf5feb35f4bb4c3487b04be15d1fe11376975523