aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into nextMatthias Sohn2024-02-211129-7952/+2038373
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Delete org.eclipse.jgit.ssh.apache.agent/bin/.project Allow to discover bitmap on disk created after the packfile Update jetty to 10.0.20 Update maven plugins Update org.assertj:assertj-core to 3.25.3 Update org.mockito:mockito-core to 5.10.0 Update org.apache.commons:commons-compress to 1.26.0 Update byte-buddy to 1.14.12 Add SystemReader.Delegate to reduce boiler-plate code needed to subclass storage.file: Do not throw NSFE when deleting tmp files FS.detectSymlinkSupport: fix a race RefDirectory: Do not unlock until after deleting loose ref Add missing javadoc description for declared exception SnapshottingRefDirectory: Invalidate snapshot after locking ref for update SnapshottingRefDir: Replace lambas with method refs SnapshottingRefDir: Reduce casts with overrides [errorprone] Fix wrong comparison which always evaluated to false [errorprone] Remove unnecessary comparison Errorprone EscapedEntity: Do not use HTML entities inside @code javadoc ChangedPathFilter: Suppress warning about backing array (errorprone) PackWriterBitmapPreparer: Do not generate bitmaps for excessive branch tips. Don't use localized String during JVM shutdown RawParseUtils.nextLfSkippingSplitLines: fulfil contract as stated [gpg] Refactor the GpgSignatureVerifier RawParseUtils: utility method to get a header value Improve handling of NFS stale handle errors Fix handling of missing pack index file Add tests for handling pack files removal during fetch RebaseCommand: fix stopping on root commit conflicts Improve handling of NFS stale handle errors Fix handling of missing pack index file CherryPick: add ability to customise cherry-picked commit message RawParseUtils: Add missing @since tag for new API method Silence API warning for new constant [ssh] Bump Apache MINA sshd 2.11.0 -> 2.12.0 Introduce a PriorityQueue sorting RevCommits by commit timestamp Remove org.eclipse.jgit.benchmark/.factorypath Update jmh to 1.37 for org.eclipse.jgit.benchmark Add tests for handling pack files removal during fetch PackWriterBitmapPreparer: Set limit on excessive branch count Update jna to 5.14.0 DfsInserter/PackParser: keep min size for index in the inserter FooterLines: handle extraction from messages without headers Silence API warnings Remove invalid/unnecessary Maven settings Update maven plugins Update org.eclipse.dash:license-tool-plugin to 1.1.0 Enable using slf4j 2.x Update Tycho to 4.0.4 Update mockito to 5.8.0 Add 4.31 target platform and update orbit to 4.31 Update ecj to 3.36.0 Renormalize line endings based on .gitattributes Configure .gitattributes to manage line endings Normalize line endings to LF for all text files BasePackFetchConnection: Skip object/ref lookups if local repo is empty LooseObjects: Use File#exists when possible Remove invalid spotbugs configuration Fix PMD plugin configuration DfsReader: give subclasses visiblity over the pack bitmap index PackBitmapIndex/StoredBitmap: Expose size and counts PackWriter/Statistics: Remove the bitmapt hit stats Configure Github issue reporting Make sure ref to prune is in packed refs FooterLine: Protect from ill-formed message API filter for PackStatistics.objectsWithBitmapsFound StartGenerator: Fix parent rewrite with non-default RevFilter Update MANIFEST.MF Document option gc.writeCommitGraph Bump last release version to 6.8.0.202311291450-r Prepare 6.9.0-SNAPSHOT builds BitmapWalkerTest: New test for the walker PackWriter: store the objects with bitmaps in the statistics FooterLine: First line cannot be a footer Reapply "Improve footer parsing to allow multiline footers." Revert "Improve footer parsing to allow multiline footers." Prepare 6.8.1-SNAPSHOT builds JGit v6.8.0.202311291450-r Rename method parameter to fix warning about hidden field Fix warnings about empty control flow statements BitmapIndexImpl: externalize error message Suppress not-externalized string warnings Silence API error for new method BitmapIndex#addBitmapLookupListener Update Orbit to orbit-aggregation/2023-12 Adapt to type parameter added in commons-compress 1.25.0 Improve footer parsing to allow multiline footers. Make the tests buildable by bazel test Prepare 6.8.0-SNAPSHOT builds JGit v6.8.0.202311212206-rc1 BitmapIndex: Add interface to track bitmaps found (or not) BitmapWalker: Remove BitmapWalkListener Update repository URLs in CONTRIBUTING.md Fix typo in FileUtils.isStaleFileHandle() javadoc Fix branch ref exist check gpg.bc: Supress errorprone InsecureCryptoUsage Adjust javadoc to pass errorprone checks Update org.apache.commons:commons-compress to 1.25.0 Fix annotation of deprecated constant CONFIG_KEY_STREAM_FILE_TRESHOLD BitmapWalkListener: Use plain interface with noop instance BitmapWalkListener: Add method and rename for commits Update bouncycastle to 1.77 PatchApplier: wrap output's TemporaryBuffer with a CountingOutputStream BitmapWalker: announce walked objects via listener interface Prepare 6.8.0-SNAPSHOT builds Update jetty to 10.0.18 SSH: bump org.apache.sshd to 2.11.0 JGit v6.8.0.202311151710-m2 Fix typo in constant name CONFIG_KEY_STREAM_FILE_TRESHOLD Simplify StringUtils#commonPrefix Optimize RefDirectory.getRefsByPrefix(String...) CommitGraphWriter: Remove unnecesary progress update call Use try-with-resource to ensure UploadPack is closed Fix hiding field warning Fix warning for empty code blocks Fix boxing warnings errorprone: remove unnecessary parentheses Update mockito to 5.7.0 and bytebuddy to 1.14.9 Enable Maven reproducible builds Upgrade bazlets to the latest revision Revert "Optimise Git protocol v2 `ref-prefix` scanning" Document GIT_TRACE_PERFORMANCE to show timings config-options.md: fix sort order ComboBitset: Add Javadoc CommitGraphWriter: Add progress monitor to bloom filter computation CommitGraphWriter: Use ProgressMonitor from the OutputStream CommitGraphWriter: Unnest generation-number progress Optimise Git protocol v2 `ref-prefix` scanning UploadPackTest: Cover using wanted-refs as advertised set UploadPack: use want-refs as advertised set in fetch v2 BasePackFetchConnection: Avoid full clone with useNegotiationTip Checkout: better directory handling .gitignore: ignore all Maven output directories `target/` benchmarks: use org.eclipse.jgit-parent as parent pom Generate SBOMs using cyclonedx maven plugin DfsPackFile: Do not attempt to read stream if pack doesn't have it PackObjectSizeIndexLoader: Log wrong bytes on exception Silence API warnings for API added in 5.13.3 FileBasedConfig: in-process synchronization for load() and save() FileUtils.rename(): better retry handling FileBasedConfig: ensure correct snapshot if no file DeleteBranchCommand: update config only at the end Config.removeSection() telling whether it changed the config RebaseCommand: return correct status on stash apply conflicts Use net.i2p.crypto.eddsa 0.3.0 from new Orbit build PackConfig: fix @since tags Remove unused API problem filters Add support for git config repack.packKeptObjects Do not exclude objects in locked packs from bitmap processing [errorprone] Fix InconsistentCapitalization TestRepository: Add getInstant method Update orbit to orbit-aggregation/2023-12 Prepare 6.8.0-SNAPSHOT builds JGit v6.8.0.202310031045-m1 UploadPack: Delay freeing refs in sendPack() ByteBufferInputStream: add missing @since 6.8 Fix log level for successful execution of ShutdownHook#notify to debug Eclipse features: update copyright year SSH agent: correct plug-in title Fix DefaultCharset bug pattern flagged by error prone Activate additional error prone checks WorkingTreeIterator: directly filter input stream [errorprone] Add missing javadoc summary [errorprone] Fix BadImport [errorprone] Prevent int expression may overflow [errorprone] Suppress ByteBufferBackingArray [errorprone] Suppress JavaLangClash to avoid breaking change [errorprone] Fix EqualsGetClass [errorprone] MockSystemReader: fix CatchAndPrintStackTrace [errorprone] MetaFilter: fix IdentityHashMapUsage [errorprone] InternalFetchConnection: Suppress CatchAndPrintStackTrace [errorprone] Don't swallow exception [errorprone] Fix inconsistent capitalization [errorprone] PageRef#isStringRef: suppress UnusedMethod [errorprone] FileReftableStack: fix EqualsUnsafeCast [errorprone] Suppress MissingSummary for translation bundles [errorprone] CommandLineMergeTool: Remove unused constuctor [errorprone] SimilarityRenameDetector: suppress IntLongMath Add comment why protocol list uses WeakReference [errorprone] Transport: Suppress ModifyCollectionInEnhancedForLoop [errorprone] Rename method parameter to silence InvalidParam [errorprone] MyersDiff#main: fix CatchAndPrintStackTrace [errorprone] TagCommand: Remove unused parameter of private method [errorprone] PathFilter#getPathsBestEffort: fix ArrayAsKeyOfSetOrMap [errorprone] DirCacheEntry: suppress JavaInstantGetSecondsGetNano [errorprone] Directly implement functional interface [errorprone] InterruptTimer#terminate: ensure Thread#join succeeds [errorprone] RawParseUtils@parseHexInt64: suppress IntLongMath [errorprone] Exceptions should not override #toString [errorprone] Fix invalid param in javadoc [errorprone] FS#searchPath: handle surprising behavior of String#split [errorprone] FileStoreAttributes#FUTURE_RUNNER: Fix corePoolSize [errorprone] Express duration using seconds which is clearer [errorprone] Use ArrayList instead of LinkedList [errorprone] AddCommand#filepattern: use a more specific type [errorprone] Suppress UnnecessaryParentheses [errorprone] Remove unnecessary parentheses tools/BUILD: Sort errorprone rules alphabetically Update jetty to 10.0.16 Update bazel to 6.3.2 DfsPackFile: remove unnecessary @SuppressWarnings("boxing") CommitGraphWriter: Remove unnecessary semicolon CommitGraphWriter: fix boxing warnings CommitGraphWriter#createCoreChunks: Remove not-thrown exceptions CommitGraphWriter: Decouple Stats from computing bloom filters CommitGraphWriter: Move bloom filter calculation out of createChunks Documentation: Move writeChangedPaths flag from commitGraph to gc section. [errorprone] Fix wrong comparison which always evaluated to false [errorprone] Remove unnecessary comparison Update org.eclipse.jdt:ecj to 3.35.0 Update org.apache.commons:commons-compress to 1.24.0 [errorprone] Suppress ImmutableEnumChecker for ShutdownHook Update bytebuddy to 1.14.8 Use ShutdownHook to gracefully handle JVM shutdown Add ShutdownHook to cleanup FileLocks on graceful JVM shutdown Unregister ShutdownHook when GC#PidLock is closed OSGi: move plugin localization to subdirectory ssh: Remove redundant null check for home.getAbsoluteFile() RevertCommand: support for inserting a Gerrit change ID [releng] Bump japicmp base version to 6.7.0.202309050840-r DfsPackFile: Record index loads only in one place DfsPackfile: Emit the index load with the index object Prepare 6.8.0-SNAPSHOT builds Prepare 6.7.1-SNAPSHOT builds Switch back to wagon-ssh-external Fix generation of maven site Ensure home directory not null before using in Sshdsessionfactory CommitGraphWriter: Make the list of chunks immutable CommitGraphWriter: Assert written bytes JGit v6.7.0.202309050840-r Remove unused API problem filters [releng] Bump japicmp base version to 6.6.0.202305301015-r Fix list of 3rd party bundles in p2 repo Add missing source bundle org.osgi.service.cm.source to target platform Prepare 6.6.2-SNAPSHOT builds JGit v6.6.1.202309021850-r Checkout: better directory handling CommitGraphWriter: throw exception on unknown chunk Document commit-graph options supported by JGit Fix warning raised for local variable hiding DfsPackFile#index Suppress boxing warnings in DfsPackFile Remove unused API problem filters Suppress boxing warnings in tests Fix warning about empty block Update mockito to 5.5.0 Update byte-buddy to 1.14.7 Prepare 6.7.0-SNAPSHOT builds JGit v6.7.0.202308301100-rc1 Remove the cbi-snapshots Maven repository Update Orbit to orbit-aggregation/release/4.29.0 Add target platform for Eclipse 2023-09 (4.29) Use release p2 repo for Eclipse 2023-06 (4.28) Update tycho to 4.0.2 Update jmh to 1.37 Update bouncycastle to 1.76 Fix some tests in ConfigTest Handle global git config $XDG_CONFIG_HOME/git/config IO: use JDK convenience methods org.eclipse.jgit.junit.ssh/.settings/.api_filters: fix unclosed tags ReadChangedPathFilter: fix Non-externalized string literal warning Introduce core.packedIndexGitUseStrongRefs config key DfsReader: Make PackLoadListener interface visible to subclasses DfsGarbageCollector: provide commit graph stats DfsGarbageCollector: put only GC commits into the commit graph DfsReader: Expose when indices are loaded Update to Tycho 4.0.1 Prepare 6.7.0-SNAPSHOT builds JGit v6.7.0.202308011830-m2 Add missing @since tags Fix errorprone warning about precedence Move footer-line parsing methods from RevCommit to FooterLine Merge: Add diff3 style merge conflict formatter. RevCommitCG: Read changed-path-filters directly from commit graph Update commons-codec to 1.16.0 Add missing @since tags for new API methods Add missing package import needed to use MurmurHash3 Identify a commit that generates a diffEntry on a rename Event. Pack: open reverse index from file if present PackReverseIndexV1: reverse index parsed from version 1 file PackReverseIndex: open file if present otherwise compute PackReverseIndex: verify checksums ComputedPackReverseIndex: Clarify custom bucket sort algorithm CommitGraphWriter: add option for writing/using bloom filters CommitGraphWriter: reuse changed path filters RevWalk: use changed path filters CommitGraphLoader: read changed-path filters CommitGraphWriter: write changed-path filters ssh: PKCS#11 support GC: Remove handling of extra pack for RefTree Remove unnecessary @SuppressWarnings("serial") Remove unused API problem filters Remove redundant specification of type arguments DfsPackParser: Create object indices if config says so PackParserTest: Extract pack-writing helper code to its own class DfsInserter: generate object size index if config says so DfsInserter: populate full size on object insertion DFSGarbargeCollector: Write object size indices DfsReader/PackFile: Implement isNotLargerThan using the obj size idx [releng] Use tycho 4.0.0 instead of 4.0.0-SNAPSHOT Add verification in GcKeepFilesTest that bitmaps are generated Express the explicit intention of creating bitmaps in GC GC: prune all packfiles after the loosen phase Update mockito to 5.4.0 and bytebuddy to 1.14.5 Fix S3Repository getSize to handle larger object sizes DfsPackFile: make #getReverseIdx public Add missing bazel dependency to benchmarks Update JMH to 1.36 Update bouncycastle to 1.75 Update org.eclipse.jdt:ecj to 3.34.0 Update eclipse-jarsigner-plugin to 1.4.2 Update maven-surefire-report-plugin to 3.0.0 Update maven-project-info-reports-plugin to 3.4.3 Update maven-compiler-plugin to 3.11.0 Update maven-enforcer-plugin to 3.3.0 Update build-helper-maven-plugin to 3.4.0 Update spring-boot-maven-plugin to 2.7.13 Update maven-source-plugin to 3.3.0 Prepare 5.13.3-SNAPSHOT builds JGit v5.13.2.202306221912-r PackReverseIndex: separate out the computed implementation Default for global (user) git ignore file Fix all Javadoc warnings and fail on them Mark COMMIT_GENERATION_* constants final Update Orbit to R20230531010532 for 2023-06 Revert "RefDirectory: Throw exception if CAS of packed ref list fails" PackReverseIndex: use static builder instead of constructor Gc#writePack: write the reverse index file to disk Bazel: Fix remote build execution for Java 17 Bump bazel vesion to 6.2.0 Prepare 6.6.1-SNAPSHOT builds JGit v6.6.0.202305301015-r Bump bazel vesion to 6.2.0 Update to Orbit S20230516204213 Prepare 6.6.0-SNAPSHOT builds Prepare 6.7.0-SNAPSHOT builds JGit v6.6.0.202305241045-m3 GraphObjectIndex: fix search in findGraphPosition Update to Tycho 4.0.0-SNAPSHOT PGP sign p2 artefacts Revert 'Use net.i2p.crypto:eddsa directly from Maven Central' Update dash license-tool-plugin to 1.0.2 Also add suppressed exception if unchecked exception occurs in finally Candidate: use "Objects.equals" instead of "==" Use hamcrest 2.2 directly from Maven Central Use commons-logging directly from Maven Central Update jna to 5.13.0 Use bytebuddy directly from Maven Central Use jna directly from Maven Central Use net.i2p.crypto:eddsa directly from Maven Central Use org.tukaani:xz directly from Maven Central Use args4j directly from Maven Central Use gson directly from Maven Central Remove unused $NON-NLS-1$ Remove unused API filters Switch to Apache MINA sshd 2.10.0 [releng] API filter for PackIndex.DEFAULT_WRITE_REVERSE_INDEX PackExt: add a #getTmpExtension method UploadPack: Record negotiation stats on fetchV2 call RewriteGeneratorTest: Introduce test cases for the RewriteGenerator PackWriter: write the PackReverseIndex file Prepare 6.6.0-SNAPSHOT builds JGit v6.6.0.202305031100-m2 Update Maven plugins Add TransportHttp#getAdditionalHeaders Add 4.27 (2023-03) and 4.28 (2023-06) target platforms Fix inProcessPackedRefsLock not shared with copies of the instance Update slf4j to 1.7.36 and consume it directly from Maven Central Update assertj-core to 3.24.2 Update plexus-compiler to 2.13.0 Update Apache commons-codec to 1.15 Update org.apache.commons:commons-compress to 1.23.0 Update javaEWAH to 1.2.3 and use it directly from Maven central Update org.eclipse.jdt:ecj to 3.33.0 Add missing @since tag to IntComparator Update to jakarta.servlet:jakarta.servlet-api:4.0.4 Support rebasing independent branches Support cherry-picking a root commit AddCommand: ability to switch off renormalization Update jetty to 10.0.15 and use it from Maven central directly Update bouncycastle to 1.73 [errorprone] Fix MissingOverride error PackReverseIndexWriter: write out version 1 reverse index file IntList: add #sort using quick sort for O(n log n) runtime. [bazel] Move ToolTestCase to src folder (6.2) GcConcurrentTest: @Ignore flaky testInterruptGc Fix CommitTemplateConfigTest Fix after_open config and Snapshotting RefDir tests to work with bazel [bazel] Skip ConfigTest#testCommitTemplatePathInHomeDirecory Demote severity of some error prone bug patterns to warnings [bazel] Fix version number of bcpg-jdk18on Parse pull.rebase=preserve as alias for pull.rebase=merges Use bouncycastle libraries directly from Maven Central UploadPack: Fix NPE when traversing a tag chain Add missing @since tag for BatchRefUpdate#getRefDatabase Add missing since tag for SshBasicTestBase Add missing since tag for SshTestHarness#publicKey2 Silence API errors Prevent infinite loop rescanning the pack list on PackMismatchException Remove blank in maven.config PackedBatchRefUpdate#execute: reduce nesting of try-catch blocks PackedBatchRefUpdate: Handle the case where loose refs fail to pack Remove blank in maven.config Add protocol configuration to Amazon S3 transport [pgm] Implement git tag --contains option ListTagCommand: implement git tag --contains RevWalk: use generation number to optimize getMergedInto() DfsPackFile: Extract block aligment code Ensure parsed RevCommitCG has derived data from commit-graph PatchApplierTest: specify charset to avoid warning GcConcurrentTest: @Ignore flaky testInterruptGc PatchApplier: Check for existence of src/dest files before any operation Revert "RefDirectory: Throw exception if CAS of packed ref list fails" RefDirectory.delete: Prevent failures when packed-refs is outdated RefDirectory.pack: Only rely on packed refs from disk RefDirectory: Make pack() and commitPackRefs() void Implement a snapshotting RefDirectory for use in request scope Fix RefDirectoryTest.testGetRefs_LooseSorting_Bug_348834 PackedBatchRefUpdate: Ensure updates are applied on latest packed refs Downgrade maven-site-plugin to 3.12.1 Use wagon-ssh-external to deploy Maven site Record my e-mail change in .mailmap [releng] Bump japicmp base version PatchApplier: missing @since, and minor formatting BasePackFetchConnection: support negotiationTip feature DirCache: support option index.skipHash PatchApplierTest: Remove test data with Apache license Fix PatchApplier error handling. Ensure FileCommitGraph scans commit-graph file if it already exists GC: Close File.lines stream GC: Close File.lines stream 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 [errorprone] Suppress [Finally] warnings Update Orbit to R20230302014618 for 2023-03 Improve test coverage when core.trustPackedRefsStat set to after_open Prepare 6.6.0-SNAPSHOT builds Prepare 6.5.0-SNAPSHOT builds JGit v6.5.0.202302281825-rc1 Prepare 6.5.0-SNAPSHOT builds Change config pull.rebase=preserve to pull.rebase=merges BatchingProgressMonitor: expose time spent per task PackWriter: offer to write an object-size index for the pack Fix formatting in GC#doGc PackExt: Define new extension for the object size index JGit v6.5.0.202302221508-m3 If tryLock fails to get the lock another gc has it Fix GcConcurrentTest#testInterruptGc Don't swallow IOException in GC.PidLock#lock Check if FileLock is valid before using or releasing it Use Java 11 ProcessHandle to get pid of the current process UploadPack: use allow-any-sha1-in-want configuration Acquire file lock "gc.pid" before running gc Silence API errors introduced by 9424052f Externalize strings introduced in c9552aba Silence API error introduced by 596c445a PackConfig: add entry for minimum size to index Fix getPackedRefs to not throw NoSuchFileException PackObjectSizeIndex: interface and impl for the object-size index UInt24Array: Array of unsigned ints encoded in 3 bytes. PackIndex: expose the position of an object-id in the index Add pack options to preserve and prune old pack files DfsPackFile/DfsGC: Write commit graphs and expose in pack ObjectReader: Allow getCommitGraph to throw IOException Allow to perform PackedBatchRefUpdate without locking loose refs Document option "core.sha1Implementation" introduced in 59029aec UploadPack: consume delimiter in object-info command PatchApplier fix - init cache with provided tree Prepare 6.5.0-SNAPSHOT builds JGit v6.5.0.202302011120-m2 Avoid error-prone warning Fix unused exception error-prone warning UploadPack: advertise object-info command if enabled Shortcut during git fetch for avoiding looping through all local refs FetchCommand: fix fetchSubmodules to work on a Ref to a blob Silence API warnings introduced by I466dcde6 Allow the exclusions of refs prefixes from bitmap Move MemRefDatabase creation in a separate method. PackWriterBitmapPreparer: do not include annotated tags in bitmap BatchingProgressMonitor: avoid int overflow when computing percentage DfsReaderIoStats: Add Commit Graph fields into DfsReaderIoStats [pgm] Fetch-CLI: add support for shallow Speedup GC listing objects referenced from reflogs Re-add servlet-api 4.0 to the target platform Upgrade maven plugins Cache trustFolderStat/trustPackedRefsStat value per-instance Refresh 'objects' dir and retry if a loose object is not found Prepare 6.5.0-SNAPSHOT builds JGit v6.5.0.202301111425-m1 Update Orbit to S20230101190934 Update to releases p2 repo for 4.26 simultaneous release RevWalk: integrate commit-graph with commit parsing FileSnapshotTest: Add more MISSING_FILE coverage GC: disable writing commit-graph for shallow repos Introduce core.trustPackedRefsStat config RefDatabase: fix javadoc formatting Pull up additionalRefsNames from RefDirectory to RefDatabase Add TernarySearchTree CommitGraph: teach ObjectReader to get commit-graph PatchApplier: fix handling of last newline in text patch CommitGraph: add commit-graph for FileObjectDatabase Reformat PatchApplier and PatchApplierTest PackWriter#prepareBitmapIndex: add clarifying comments IO#readFully: provide overload that fills the full array Fix API warnings for the new CommitGraph PackReverseIndex#findPosition: fix typo in method name GC: Write commit-graph files when gc CommitGraph: add core.commitGraph config CommitGraph: implement commit-graph read Gc#deleteOrphans: avoid dependence on PackExt alphabetical ordering WalkPushConnection: Sanitize paths given to transports Fix documentation for core.trustFolderStat GraphCommits: Remove unused getter by position CommitGraphWriter: fix UnusedException errorprone error Update jetty to 10.0.13 PackExt: Add a commit graph extension. BatchRefUpdate: Consistent switch branches in ref update RefWriter#writePackedRefs: Remove a redundant "if" check commitgraph package: fix exports/imports, add @since tag for new API CommitGraph: implement commit-graph writer [releng] bump japicmp base version Prepare 6.4.1-SNAPSHOT builds JGit v6.4.0.202211300538-r Fix crashes on rare combination of file names Prepare 6.5.0-SNAPSHOT builds Prepare 6.4.0-SNAPSHOT build JGit v6.4.0.202211231055-rc1 [pgm] Add options --name-only, --name-status to diff, log, show Update Orbit to R20221123021534 for 2022-12 RBE: Update toolchain with bazel-toolchains 5.1.2 release SshTestGitServer: : ensure UploadPack is closed to fix resource leak UploadPackTest: ensure UploadPack is closed to fix resource leak [pgm] Ensure UploadPack is closed to fix resource leak UploadPackServlet#doPost use try-with-resource to ensure up is closed Fix warnings in PatchApplierTest Fix boxing warnings in TransportTest Silence warnings about unclosed BasePackPushConnection Fix warning about non-externalized String Remove unused imports Suppress non-externalized String warnings Remove unused API problem filters Silence API errors Silence API errors Silence API warnings Add 4.26 target platform Use "releases" repository for 4.25 target platform Update Apache Mina SSHD to 2.9.2 Update Orbit to S20221118032057 DfsBlockCache: Report IndexEventConsumer metrics for reverse indexes. DfsStreamKey: Replace ForReverseIndex to separate metrics. Prepare 6.4.0-SNAPSHOT builds RawText.isBinary(): handle complete buffer correctly JGit v6.4.0.202211160543-m3 PackExt: Add a reverse index extension. [benchmarks] Remove profiler configuration Add SHA1 benchmark [benchmarks] Set version of maven-compiler-plugin to 3.8.1 Fix running JMH benchmarks Add option to allow using JDK's SHA1 implementation Fix API breakage caused by extracting WorkTreeUpdater Update Orbit to S20221109014815 Use replace instead of replaceAll in toCleanString Extract Exception -> HTTP status code mapping for reuse Don't handle internal git errors as an HTTP error Fix the path for JSchText.properties Fix crashes on rare combination of file names Fix Maven SHA1 for Bazel build UploadPack: Receive and parse client session-id TransferConfig: Move reading advertisesid setting into TransferConfig FirstWant: Parse client session-id if received. ReceivePack: Receive and parse client session-id. Ignore IllegalStateException if JVM is already shutting down Prepare 6.4.0-SNAPSHOT builds Allow to perform PackedBatchRefUpdate without locking loose refs JGit v6.4.0.202210260700-m2 PushCommand: allow users to disable use of bitmaps for push I/O redirection for the pre-push hook PackParser: populate full size of the PackedObjectInfos PackedObjectInfo: add the full size to the description ObjectReader: New #isNotLargerThan method Fail build if there are license issues with dependencies Update org.apache.httpcomponents:httpcore to 4.4.15 Update Orbit to S20220927175816 Update JMH to 1.35 Update org.eclipse.jdt:ecj to 3.31.0 Update plexus compiler to 2.12.1 Update org.apache.maven.wagon:wagon-ssh to 3.5.2 pgm/BUILD: Add dependencty to java EWAH [sshd] Guard against numerical overflow Remove unused imports Remove unused API filters ObjectDirectory: avoid using File.getCanonicalPath() AutoCRLFOutputStream: use BufferedOutputStream CloneCommand: set HEAD also when not checking out Pass on shallowSince only if not null Fix wrong @since tag Split out ApplyCommand logic to PatchApplier class Prepare 6.4.0-SNAPSHOT builds Fix typo in FetchV2Request javadoc Prepare 6.3.1-SNAPSHOT builds DfsBundleWriter: Add test case about GC_REST pack. 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 Move WorkTreeUpdater to merge package WorkTreeUpdater: use DirCacheCheckout#StreamSupplier DirCacheCheckout#getContent: also take InputStream supplier Revert "Adds FilteredRevCommit that can overwrites its parents in the DAG." Revert "Option to pass start RevCommit to be blamed on to the BlameGenerator." WorkTreeUpdater: remove safeWrite option 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 Prepare 6.3.0-SNAPSHOT builds Adds FilteredRevCommit that can overwrites its parents in the DAG. JGit v6.3.0.202208161710-m3 DirCacheCheckout: load WorkingTreeOptions only once WorkTreeUpdater: Fix unclosed streams Fix adding symlinks to the index when core.symlinks=false Remove unused API problem filters Add missing @since tag for RevCommit#parents introduced in 61b4d105e4 Fix API errors caused by 23a71696cd Provide default shallowCommits getter and setter in ObjectDatabase Reapply "Create util class for work tree updating in both filesystem and index." ResolveMerger: add coverage for inCore file => directory transition Provide encoding to String#getBytes() Revert "Create util class for work tree updating in both filesystem and index." Provide a default implementation for set/get shallowCommits on DfsObjDatabase Revert "Adds FilteredRevCommit that can overwrites its parents in the DAG." Revert "Option to pass start RevCommit to be blamed on to the BlameGenerator." CleanCommand: fix prefix matching Option to pass start RevCommit to be blamed on to the BlameGenerator. Adds FilteredRevCommit that can overwrites its parents in the DAG. Add the ability to override parents on RevCommit. Refactor NameConflictTreeWalk.fastMin method Fix BUILD rules for FilteredRenameDetectorTest Rename fastMinHasMatch to allTreesNamesMatchFastMinRef Document TreeWalk#min() Squash error-prone messages Use constants for git packet protocol line identifiers ObjectDirectory: improve reading of shallow file Fetch: add support for shallow [tests] Stabilize the HTTP server's request log NameConflictTreeWalk: respect git order on multi-tree iteration Update Orbit to S20220726152247 and bouncycastle to 1.71 Create util class for work tree updating in both filesystem and index. Fix the handling of .git/info/exclude and core.excludesFile Remove version constraints from org.tukaani.xz package Change-Id: I31997b67bf432ae3bf6b1cde076fa9307b1e00f4
| * Merge branch 'stable-6.8'Matthias Sohn2024-02-215-10/+36
| |\ | | | | | | | | | | | | | | | | | | | | | * stable-6.8: Delete org.eclipse.jgit.ssh.apache.agent/bin/.project Allow to discover bitmap on disk created after the packfile Change-Id: I08095dfaefb963876d993383cb35acc6b75d7691
| | * Merge branch 'stable-6.7' into stable-6.8Matthias Sohn2024-02-215-10/+36
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.7: Delete org.eclipse.jgit.ssh.apache.agent/bin/.project Allow to discover bitmap on disk created after the packfile Change-Id: I01749bae6f46d1a8ebd25b890e667cc092f3a659
| | | * Merge branch 'stable-6.6' into stable-6.7Matthias Sohn2024-02-216-38/+36
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.6: Delete org.eclipse.jgit.ssh.apache.agent/bin/.project Allow to discover bitmap on disk created after the packfile Change-Id: I2bbc8c9a4ed45d37fa7ba63b2afd5511b6cf47a2
| | | | * Delete org.eclipse.jgit.ssh.apache.agent/bin/.projectMatthias Sohn2024-02-211-28/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: If2f50f81ffb8b5a1929b0ce403bff017ece29e2f
| | | | * Allow to discover bitmap on disk created after the packfileLuca Milanesio2024-02-205-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the bitmap file was created *after* a packfile had been loaded into the memory, JGit was unable to discover them. That happed because of two problems: 1. The PackDirectory.getPacks() does not implement the usual while loop that is scanning through the packs directory as in the other parts of JGit. 2. The scan packs does not look for newly created bitmap files if the packfile is already loaded in memory. Implement the normal packfiles scanning whenever the PackDirectory needs to return a list of packs, and make sure that any reused Pack object would have its associated bitmap properly refreshed from disk. Adapt the assertions in GcConcurrentTest with the rescanned list of Pack from the objects/packs directory. Bug: jgit-15 Change-Id: I2ed576cefd78a0e128b175228a59c9af51523d7b
| * | | | Update jetty to 10.0.20Matthias Sohn2024-02-2018-143/+143
| | | | | | | | | | | | | | | | | | | | Change-Id: Ic79c5ce718fe1345f75c4254a9ee2aa7d91af359
| * | | | Update maven pluginsMatthias Sohn2024-02-203-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - build-helper-maven-plugin to 3.5.0 - cyclonedx-maven-plugin to 2.7.11 - eclipse-jarsigner-plugin to 1.4.3 - git-commit-id-maven-plugin to 7.0.0 - japicmp-maven-plugin to 0.18.5 - maven-clean-plugin to 3.3.2 - maven-compiler-plugin to 3.12.1 - maven-enforcer-plugin to 3.4.1 - maven-jxr-plugin to 3.3.2< - maven-site-plugin to 4.0.0-M13 - spotbugs-maven-plugin to 4.8.3.1 - tycho plugins to 4.0.6 Change-Id: Ie792f783b8b8453a37743f10f8c4162932e5ff85
| * | | | Update org.assertj:assertj-core to 3.25.3Matthias Sohn2024-02-2018-34/+34
| | | | | | | | | | | | | | | | | | | | Change-Id: I3fd8adf3c1cc3f2c8826602b11d1d11fdfe29bfb
| * | | | Update org.mockito:mockito-core to 5.10.0Matthias Sohn2024-02-2018-34/+34
| | | | | | | | | | | | | | | | | | | | Change-Id: I35dbb2402e65753e10bef4617b7e1683f9900406
| * | | | Update org.apache.commons:commons-compress to 1.26.0Matthias Sohn2024-02-2022-34/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new version now requires commons-io for the tests. Hence adding dependency to commons-io:commons-io:2.15.1. Change-Id: Ieb50ef559a119c89f90d700ab95a73c0fcae85a8
| * | | | Update byte-buddy to 1.14.12Matthias Sohn2024-02-2018-51/+51
| | | | | | | | | | | | | | | | | | | | Change-Id: Idc56efd1ee6d9d1e039ccfffd5e16803b727f6dc
| * | | | Add SystemReader.Delegate to reduce boiler-plate code needed to subclassMatthias Sohn2024-02-201-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original implementation by Han-Wen Nienhuys in Gerrit [1]. [1] https://gerrit-review.googlesource.com/c/gerrit/+/235169 Bug: jgit-24 Change-Id: I745f8c1c07de013a68168b91c2d9962d530d07bf
| * | | | storage.file: Do not throw NSFE when deleting tmp filesNasser Grainawi2024-02-194-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we try to delete a tmp file and it already doesn't exist, then there's no problem and we don't need to throw an exception. This is especially true for these existing cases using FileUtils.RETRY because any missing files on retries are already considered successes. Not throwing the exception quiets some logs and improves overall exception handling. Change-Id: Ia6e06ba042c5920d5cd9f8db2e1d829affa3d796 Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
| * | | | FS.detectSymlinkSupport: fix a raceMotiejus Jakštys2024-02-192-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When multiple JGit clients are instantiated concurrently, they may try to create the same symlink at the same time. When that happens, the second thread will return an error (because the symlink already exists) and that `FS` instance will think that symlinks are not supported, causing havoc. Change-Id: I362b933ff63a1471e3a5d70cc8c35eb2f25cc0dd Signed-off-by: Motiejus Jakštys <motiejus@jakstys.lt>
| * | | | Merge changes I8e577a23,Ic8e8b288Matthias Sohn2024-02-193-3/+4
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Errorprone EscapedEntity: Do not use HTML entities inside @code javadoc ChangedPathFilter: Suppress warning about backing array (errorprone)
| | * | | | Errorprone EscapedEntity: Do not use HTML entities inside @code javadocIvan Frade2024-02-092-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8e577a23e7fbe22a3024ad62144e7f19eec465c3
| | * | | | ChangedPathFilter: Suppress warning about backing array (errorprone)Ivan Frade2024-02-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Errorprone warns about direct access to the underlying array. That is the intention of this code, and those ByteBuffers are created with ByteBuffer#wrap() so it should be safe. Change-Id: Ic8e8b288f08ac794cf7f09dfccfefcba0a4685bf
| * | | | | Merge changes I9225d6a3,I9cf093ca,Id5a80635Matthias Sohn2024-02-197-63/+204
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: RawParseUtils.nextLfSkippingSplitLines: fulfil contract as stated [gpg] Refactor the GpgSignatureVerifier RawParseUtils: utility method to get a header value
| | * | | | | RawParseUtils.nextLfSkippingSplitLines: fulfil contract as statedThomas Wolf2024-02-012-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is no newline after the last header, the method is supposed to return the buffer length, but it returned buffer.length - 1. Change-Id: I9225d6a35a002244c246bc8781ceaf4369fb9a60
| | * | | | | [gpg] Refactor the GpgSignatureVerifierThomas Wolf2024-02-014-54/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new method verify(GpgConfig, byte[], byte[]) and deprecate the existing verify(byte[], byte[]). Some implementations of the interface may need the GpgConfig. Factor out extracting the raw armored signature from commits or tags into an abstract AbstractGpgSignatureVerifier class so that different implementations don't have to re-implement that bit. Call the new verify method, passing along the GpgConfig. This makes the GPG interfaces more versatile and facilitates implementing an alternate GpgSignatureVerifier. Change-Id: I9cf093caa9fdebede801d665f2591cd9b275e1fd
| | * | | | | RawParseUtils: utility method to get a header valueThomas Wolf2024-02-013-8/+74
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new method takes care of removing the leading blanks on continuation lines in multi-line headers. Change-Id: Id5a8063512a2abc3177c104d6ba8fa50d0dc6352
| * | | | | Merge branch 'stable-6.8' into masterDariusz Luksza2024-02-153-26/+80
| |\ \ \ \ \ | | | |/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.8: RefDirectory: Do not unlock until after deleting loose ref Add missing javadoc description for declared exception SnapshottingRefDirectory: Invalidate snapshot after locking ref for update SnapshottingRefDir: Replace lambas with method refs SnapshottingRefDir: Reduce casts with overrides [errorprone] Fix wrong comparison which always evaluated to false [errorprone] Remove unnecessary comparison Change-Id: I1d65c41292779dd5f8f46bc0adefbfc9a62ba2ce
| | * | | | Merge branch 'stable-6.7' into stable-6.8Dariusz Luksza2024-02-153-26/+80
| | |\ \ \ \ | | | | |/ / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.7: RefDirectory: Do not unlock until after deleting loose ref Add missing javadoc description for declared exception SnapshottingRefDirectory: Invalidate snapshot after locking ref for update SnapshottingRefDir: Replace lambas with method refs SnapshottingRefDir: Reduce casts with overrides [errorprone] Fix wrong comparison which always evaluated to false [errorprone] Remove unnecessary comparison Change-Id: Ic6312bd3b2b1db38a287ebc7f31062251341438a
| | | * | | Merge branch 'stable-6.6' into stable-6.7Dariusz Luksza2024-02-153-26/+80
| | | |\ \ \ | | | | | |/ | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.6: RefDirectory: Do not unlock until after deleting loose ref Add missing javadoc description for declared exception SnapshottingRefDirectory: Invalidate snapshot after locking ref for update SnapshottingRefDir: Replace lambas with method refs SnapshottingRefDir: Reduce casts with overrides Change-Id: Ic5f3c46e5557d0bd143694bd6020b67b6ec8f22e
| | | | * | RefDirectory: Do not unlock until after deleting loose refNasser Grainawi2024-02-131-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a potential race condition where we would remove our loose ref lock file before deleting the loose ref itself. This race could result in the current thread deleting a loose ref newly written by another thread. Other callers seem to be following the correct pattern, but improve the method naming to try to help future callers. Change-Id: I80cebe4788edd855e15381336d980c41498fca80 Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
| | | | * | Add missing javadoc description for declared exceptionMatthias Sohn2024-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I16305bc15d2ddff1ce055772a711658ef81858e2
| | | | * | SnapshottingRefDirectory: Invalidate snapshot after locking ref forNasser Grainawi2024-02-132-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | update When using the SnapshottingRefDirectory, if a thread has already read packed-refs, then another actor updates packed-refs, the original thread may create an update that is based on the old cached/snapshotted packed-refs content. That update could effectively perform a forced update unintentionally because it is unaware of the new content. This seems particularly likely to happen in a scenario where a loose ref was just packed. If the ref was loose, our thread would see the current ref value (because we don't snapshot loose refs and always read them from disk), but since there is no loose ref, we expect to find the current value in packed-refs. However, (before this change) we rely on our snapshot of packed-refs which does not contain the updated ref value. Invalidating the cache after the loose ref is locked ensures that the ref value does not change again before we read it to perform the update. Bug: jgit-21 Change-Id: Id10900a99bfd0401a1b9c39d997093af0289649e Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
| | | | * | SnapshottingRefDir: Replace lambas with method refsNasser Grainawi2024-02-131-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Method references are shorter and easier to read in this case. Change-Id: Ia6809fa0e3f282acbe7b7f7e3813a34f3cf40c43 Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
| | | | * | SnapshottingRefDir: Reduce casts with overridesNasser Grainawi2024-02-131-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Overriding getRefDirectory() and getRefDatabase() lets us skip casting to SnapshottingRefDirectory in several places. Change-Id: I61ba12fb6f066b1a9c4ea5ec9538978cbf040acd Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
| | | * | | [errorprone] Fix wrong comparison which always evaluated to falseMatthias Sohn2024-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphObjectIndex.java:59: error: [ComparisonOutOfRange] ints may have a value in the range -2147483648 to 2147483647; therefore, this comparison to Integer.MAX_VALUE will always evaluate to false if (table[k] > Integer.MAX_VALUE) { ^ See https://errorprone.info/bugpattern/ComparisonOutOfRange We need to check if variable `uint` of type `long` exceeds the maximum possible int value before casting it to `int` below. This was introduced in Ib5c0d6678cb242870a0f5841bd413ad3885e95f6 Change-Id: I675d594f523084be4c1678328cc343065e32d998 (cherry picked from commit 916200e278ebeaa2602b5dc23143c8eedf11858b)
| | | * | | [errorprone] Remove unnecessary comparisonMatthias Sohn2024-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Raised by errorprone: org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitConfig.java:406: error: [ComparisonOutOfRange] chars may have a value in the range 0 to 65535; therefore, this comparison to 0 will always evaluate to true if (ch >= 0 && ch < inUse.length) { ^ see https://errorprone.info/bugpattern/ComparisonOutOfRange Change-Id: I9625aa7894a34dbffd77d39a40c6e285c86b56d5 (cherry picked from commit cf5ec856bda907c0537ce5a80246b9ab18195c8b)
| * | | | | Merge branch 'stable-6.8' into masterDariusz Luksza2024-02-120-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.8: Improve handling of NFS stale handle errors Fix handling of missing pack index file Add tests for handling pack files removal during fetch Change-Id: Icae170f85d71e65c308078648ae85dfc8308176d
| | * | | | Merge branch 'stable-6.7' into stable-6.8Dariusz Luksza2024-02-123-5/+169
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.7: Improve handling of NFS stale handle errors Fix handling of missing pack index file Add tests for handling pack files removal during fetch Change-Id: I409d1dc3354ad65c048d2c40f39071a1207246c6
| | | * | | Merge branch 'stable-6.6' into stable-6.7Dariusz Luksza2024-02-123-5/+169
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.6: Improve handling of NFS stale handle errors Fix handling of missing pack index file Add tests for handling pack files removal during fetch Change-Id: Ie00984319d68beeffcbdb6bb323fbeb94a118e5c
| | | | * | Improve handling of NFS stale handle errorsDariusz Luksza2024-01-291-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark packfile as invalid when NFS stale handle error occurs. This should fix broken fetch operations when the repo is located on the NFS system and is GC'ed on a separate system (or process). Which may result in the index, pack or bitmap file being removed when they are accessed from the fetch operation. Bug: 573770 Signed-off-by: Dariusz Luksza <dariusz.luksza@gmail.com> Change-Id: I70217bfb93bf7421ea2c1d74cbe4f15c76d9c098 (cherry picked from commit c701c01b49d92993f1c3df0a0e26a2dd68b8cec1)
| | | | * | Fix handling of missing pack index fileDariusz Luksza2024-01-293-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As demonstrated in `UploadPackHandleDeletedPackFile.testV2IdxFileRemovedDuringUploadPack` the fetch operation will fail when the pack index file is removed. This is due to a wrapping of `FileNotFoundException` (which is a subclass of `IOExeption`) in an `IOException` at PackIndex L#68. This is then changing the behaviour of error handling in `Pack.file.getBitmapIndex()` where the `FileNotFoundException` is swallowed and allows the fetch process to continue. With FNFE being wrapped in IOE, this blows up and breaks the fetch operation. Simply rethrowing `FileNotFoundException` from `PackFile.open()` fixes the broken fetch operation. This will also mark the whole pack as invalid in the `IOException` handler in `Pack.idx()` method. Change-Id: Ibe321aa1af21d26500e1cb2eb3464cc99a6dbc62 Signed-off-by: Dariusz Luksza <dariusz.luksza@gmail.com> (cherry picked from commit e0910eda3ea1c474b4cf9b00ac698f739a982f8c)
| | | | * | Add tests for handling pack files removal during fetchDariusz Luksza2024-01-291-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although this could sound like a corner case, it really can occur out there in the real world. Especially in the Gerrit world where the repositories could be GC'ed on a separate process or system. The `FileNotFoundException` seems to be handled correctly in `PackFile#doOpen` (line 671) and it will mark the pack as invalid. But triggering that code path was not an easy task. First of all, we need to add a new commit to the `master` branch of the test repository after `UploadPack` object is created. Secondly, in the refspec for fetch, commit id instead of "regular" refspec must be used. With both in place, we can see a warning log statement about deleted pack file. And the fetch succeeds! Also, tests for the removal of *.idx and *.bitmap files were added. This unveiled a corner for the *.idx file deletion while fetching, as the test will fail with "Unreachable pack index" IOException only when the HEAD commit is empty. Change-Id: If26c83f9b12993d1ab7d6bad6bd863c29520b062 Signed-off-by: Dariusz Luksza <dariusz.luksza@gmail.com> (cherry picked from commit ba5adc4ce6f234cb300b0f73a1efdba9bba1b5d8)
| * | | | | PackWriterBitmapPreparer: Do not generate bitmaps for excessive branch tips.jackdt@google.com2024-02-071-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In https://review.gerrithub.io/c/eclipse-jgit/jgit/+/1174407, I changed the bitmap selection algorithm to cap the number of branches included in the bitmap. There was a bug in that change. When the selection algorithm iterates over the commits in a branch B, it automatically includes a bitmap for the tip of any other branch C that happens to be on B. So even though we never iterated over C, we would still index the tip commit of C. Keep a list of the "excessive" branch tips and check that the commit is not in there before generating a bitmap. We only skip tips that would be selected as a result of being a tip. If it would be selected for some other reason (e.g. it is one of the first 100 commits in master) then it is not skipped. Change-Id: Ic8b4f82e816eac649a47c8918a41ed4ff0d877cd
| * | | | | Don't use localized String during JVM shutdownMatthias Sohn2024-02-063-3/+3
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During shutdown the JGitText class may already be unloaded causing NoClassDefFoundError. Bug: jgit-17 Change-Id: I657b5a508efc8b3778be346d640f4e4d69abd5c5
| * | | | RebaseCommand: fix stopping on root commit conflictsThomas Wolf2024-01-282-5/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If rebasing runs into a conflict when applying a root commit from an independent branch, there is no parent commit. Write an empty patch file in that case like C git does. Bug: jgit-6 Change-Id: I315313673d2abf29639d7d96c958d599961ba276 Signed-off-by: Thomas Wolf <twolf@apache.org>
| * | | | Improve handling of NFS stale handle errorsDariusz Luksza2024-01-281-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark packfile as invalid when NFS stale handle error occurs. This should fix broken fetch operations when the repo is located on the NFS system and is GC'ed on a separate system (or process). Which may result in the index, pack or bitmap file being removed when they are accessed from the fetch operation. Bug: 573770 Signed-off-by: Dariusz Luksza <dariusz.luksza@gmail.com> Change-Id: I70217bfb93bf7421ea2c1d74cbe4f15c76d9c098
| * | | | Fix handling of missing pack index fileDariusz Luksza2024-01-283-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As demonstrated in `UploadPackHandleDeletedPackFile.testV2IdxFileRemovedDuringUploadPack` the fetch operation will fail when the pack index file is removed. This is due to a wrapping of `FileNotFoundException` (which is a subclass of `IOExeption`) in an `IOException` at PackIndex L#68. This is then changing the behaviour of error handling in `Pack.file.getBitmapIndex()` where the `FileNotFoundException` is swallowed and allows the fetch process to continue. With FNFE being wrapped in IOE, this blows up and breaks the fetch operation. Simply rethrowing `FileNotFoundException` from `PackFile.open()` fixes the broken fetch operation. This will also mark the whole pack as invalid in the `IOException` handler in `Pack.idx()` method. Change-Id: Ibe321aa1af21d26500e1cb2eb3464cc99a6dbc62 Signed-off-by: Dariusz Luksza <dariusz.luksza@gmail.com>
| * | | | CherryPick: add ability to customise cherry-picked commit messageDmitrii Naumenko2024-01-285-1/+309
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally I wanted to support a feature similar to `-x` options from https://git-scm.com/docs/git-cherry-pick#_options. The idea was to append original commit hash in this format: ``` my original commit message (cherry picked from commit 75355897dc28e9975afed028c1a6d8c6b97b2a3c) ``` This can be useful information in some integrations. I decided to make it in a more generic way and pass custom `CherryPickCommitMessageProvider` implementation. One of the two default implementations can append original commit hash Change-Id: Id664e8438b0b76c5cb9b58113887eec04aa6f611
| * | | | RawParseUtils: Add missing @since tag for new API methodMatthias Sohn2024-01-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method was introduced in 8116f66b9c. Change-Id: Ifd3341a03464a1d7164c176cf3a6cf83f45a2747
| * | | | Silence API warning for new constantMatthias Sohn2024-01-231-19/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and remove unused API problem filters. Change-Id: Ia6f4fcc98b786e3e4b65f9e42cc60bbf6ca7c289
| * | | | [ssh] Bump Apache MINA sshd 2.11.0 -> 2.12.0Thomas Wolf2024-01-2021-141/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes the upstream fix for CVE-2023-48795[1] ("strict KEX" protocol extension mitigating the "Terrapin attack"[2]) in JGit. [1] https://nvd.nist.gov/vuln/detail/CVE-2023-48795 [2] https://www.terrapin-attack.com/ Bug: jgit-16 Change-Id: Ie9aa5b903ea6795bd1511afea0bebdb537b56148 Signed-off-by: Thomas Wolf <twolf@apache.org>
| * | | | Merge branch 'stable-6.8'Matthias Sohn2024-01-2011-40/+448
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.8: Introduce a PriorityQueue sorting RevCommits by commit timestamp Remove org.eclipse.jgit.benchmark/.factorypath Update jmh to 1.37 for org.eclipse.jgit.benchmark Change-Id: Ifdd88eed34be3a1f4897b468392fd86bbc3f3a64
| | * | | Merge branch 'stable-6.7' into stable-6.8Matthias Sohn2024-01-2011-41/+449
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.7: Introduce a PriorityQueue sorting RevCommits by commit timestamp Remove org.eclipse.jgit.benchmark/.factorypath Update jmh to 1.37 for org.eclipse.jgit.benchmark Change-Id: I5d49a9dc7da17b83243229d4d8d3b9ee0a063e65
| | | * | Merge branch 'stable-6.6' into stable-6.7Matthias Sohn2024-01-2013-87/+463
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.6: Introduce a PriorityQueue sorting RevCommits by commit timestamp Remove org.eclipse.jgit.benchmark/.factorypath Update jmh to 1.37 for org.eclipse.jgit.benchmark Change-Id: I76ebca527e523f124bfe81c821169c790eddccb6