summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Re-add servlet-api 4.0 to the target platformMatthias Sohn2023-01-1611-10/+65
| | | | | | This was removed from the JGit target platform by mistake in 6ca3d219. Change-Id: Iedae0586fb96651255b67ed6dbb9ff7702c0ea54
* Upgrade maven pluginsMichael Keppler2023-01-133-31/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove tycho-extras-version, because Tycho and Tycho Extras are meanwhile in a single repository and maintained together. Update - build-helper-maven-plugin to 3.3.0 - eclipse-jarsigner-plugin to 1.3.5 - jacoco-maven-plugin to 0.8.8 - japicmp to 0.17.1 - maven-antrun-plugin to 3.1.0 - maven-clean-plugin to 3.2.0 - maven-compiler-plugin to 3.10.1 - maven-dependency-plugin to 3.5.0 - maven-deploy-plugin to 3.0.0 - maven-enforcer-plugin to 3.1.0 - maven-install-plugin to 3.1.0 - maven-jar-plugin to 3.3.0 - maven-javadoc-plugin to 3.4.1 - maven-jxr-plugin to 3.3.0 - maven-pmd-plugin to 3.20.0 - maven-project-info-reports-plugin to 3.4.2 - maven-resources-plugin to 3.3.0 - maven-shade-plugin to 3.4.1 - maven-site-plugin to 4.0.0-M4 - maven-surefire-plugin to 3.0.0-M8 - spotbugs-maven-plugin to 4.7.3.0 - spring-boot-maven-plugin to 2.7.7 Change-Id: I14d9ff06d2f509d782eb63adfa6b5733649f11f1
* Merge branch 'stable-6.5'Matthias Sohn2023-01-130-0/+0
|\ | | | | | | | | | | | | | | * stable-6.5: Prepare 6.5.0-SNAPSHOT builds JGit v6.5.0.202301111425-m1 Change-Id: Ic37f47cb1a7d975918ee9d416576ea9e30aa62db
| * Prepare 6.5.0-SNAPSHOT buildsMatthias Sohn2023-01-1191-125/+125
| | | | | | | | Change-Id: I6fbda9ad8e054a664cb79c3a32baded12ad6802f
| * JGit v6.5.0.202301111425-m1v6.5.0.202301111425-m1Matthias Sohn2023-01-1191-125/+125
| | | | | | | | | | Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Change-Id: I4e81d5c61d66f748e0c5bc86d95f579b5990e9f4
* | Merge branch 'stable-6.4'Matthias Sohn2023-01-135-32/+87
|\ \ | |/ |/| | | | | | | | | | | * stable-6.4: Cache trustFolderStat/trustPackedRefsStat value per-instance Refresh 'objects' dir and retry if a loose object is not found Change-Id: Iea8038dfde29ab988501469f86ee829e578a2fe8
| * Merge branch 'stable-6.3' into stable-6.4Matthias Sohn2023-01-135-32/+87
| |\ | | | | | | | | | | | | | | | | | | | | | * stable-6.3: Cache trustFolderStat/trustPackedRefsStat value per-instance Refresh 'objects' dir and retry if a loose object is not found Change-Id: I1db2b51ae8101f345d08235d4f3dc416bfcb42d5
| | * Merge branch 'stable-6.2' into stable-6.3Matthias Sohn2023-01-135-32/+87
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.2: Cache trustFolderStat/trustPackedRefsStat value per-instance Refresh 'objects' dir and retry if a loose object is not found Change-Id: Ibc9bffab8c9ef9c39384b53c142d99878f7f3f98
| | | * Merge branch 'stable-6.1' into stable-6.2Matthias Sohn2023-01-135-32/+87
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.1: Cache trustFolderStat/trustPackedRefsStat value per-instance Refresh 'objects' dir and retry if a loose object is not found Change-Id: I9e876f72f735f58bf02c7862a3d8e657fc46a7b9
| | | | * Cache trustFolderStat/trustPackedRefsStat value per-instanceNasser Grainawi2023-01-132-23/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of re-reading the config every time the methods using these values were called, cache the config value at the time of instance construction. Caching the values improves performance for each of the method calls. These configs are set based on the filesystem storing the repository and unlikely to change while an application is running. Change-Id: I1cae26dad672dd28b766ac532a871671475652df Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
| | | | * Refresh 'objects' dir and retry if a loose object is not foundKaushik Lingarkar2023-01-133-9/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new loose object may not be immediately visible on a NFS client if it was created on another client. Refreshing the 'objects' dir and trying again can help work around the NFS behavior. Here's an E2E problem that this change can help fix. Consider a Gerrit multi-primary setup with repositories based on NFS. Add a new patch-set to an existing change and then immediately fetch the new patch-set of that change. If the fetch is handled by a Gerrit primary different that the one which created the patch-set, then we sometimes run into a MissingObjectException that causes the fetch to fail. Bug: 581317 Change-Id: Iccc6676c68ef13a1e8b2ff52b3eeca790a89a13d Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
* | | | | Update Orbit to S20230101190934Matthias Sohn2023-01-1124-124/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and update - com.google.gson to 2.10.0.v20221207-1049" - org.apache.commons.compress to 1.22.0.v20221207-1049 - org.apache.httpcomponents.httpclient to 4.5.14.v20221207-1049 - org.apache.httpcomponents.httpcore to 4.4.16.v20221207-1049 Change-Id: I8da9be68162636ca2530ea042b069c533c7d975a
* | | | | Update to releases p2 repo for 4.26 simultaneous releaseMatthias Sohn2023-01-112-3/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I31690aeba1f4a5e9111de184ba81c4f971c756e0
* | | | | RevWalk: integrate commit-graph with commit parsingkylezhao2023-01-105-1/+514
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RevWalk#createCommit() will inspect the commit-graph file to find the specified object's graph position and then return a new RevCommitCG instance. RevCommitGC is a RevCommit with an additional "pointer" (the position) to the commit-graph, so it can load the headers and metadata from there instead of the pack. This saves IO access in walks where the body is not needed (i.e. #isRetainBody is false and #parseBody is not invoked). RevWalk uses automatically the commit-graph if available, no action needed from callers. The commit-graph is fetched on first access from the reader (that internally can keep it loaded and reuse it between walks). The startup cost of reading the entire commit graph is small. After testing, reading a commit-graph with 1 million commits takes less than 50ms. If we use RepositoryCache, it will not be initialized util the commit-graph is rewritten. Bug: 574368 Change-Id: I90d0f64af24f3acc3eae6da984eae302d338f5ee Signed-off-by: kylezhao <kylezhao@tencent.com>
* | | | | Merge branch 'stable-6.4'Matthias Sohn2023-01-065-3/+78
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.4: Introduce core.trustPackedRefsStat config Fix documentation for core.trustFolderStat Change-Id: I93ad0c49b70113134026364c9f647de89d948693
| * | | | Merge branch 'stable-6.3' into stable-6.4Matthias Sohn2023-01-054-3/+61
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.3: Introduce core.trustPackedRefsStat config Fix documentation for core.trustFolderStat Change-Id: I18d9fc89c9ac1ef069dcefa7d7f992a28539ccf3
| | * | | Merge branch 'stable-6.2' into stable-6.3Matthias Sohn2023-01-056-3/+247
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.2: Introduce core.trustPackedRefsStat config Fix documentation for core.trustFolderStat Change-Id: I48b6c095ac62dc859829d6fef45325accbb0a144
| | | * | Merge branch 'stable-6.1' into stable-6.2Matthias Sohn2023-01-055-3/+75
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.1: Introduce core.trustPackedRefsStat config Fix documentation for core.trustFolderStat Change-Id: Ic78630f74c72624932a384eed52ef79ae1eff3e5
| | | | * Introduce core.trustPackedRefsStat configKaushik Lingarkar2023-01-055-2/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we always read packed-refs file when 'trustFolderStat' is false. Introduce a new config 'trustPackedRefsStat' which takes precedence over 'trustFolderStat' when reading packed refs. Possible values for this new config are: * always: Trust packed-refs file attributes * after_open: Same as 'always', but refresh the file attributes of packed-refs before trusting it * never: Always read the packed-refs file * unset: Fallback to 'trustFolderStat' to determine if the file attributes of packed-refs can be trusted Folks whose repositories are on NFS and have traditionally been setting 'trustFolderStat=false' can now get some performance improvement with 'trustPackedRefsStat=after_open' as it refreshes the file attributes of packed-refs (at least on some NFS clients) before considering it. For example, consider a repository on NFS with ~500k packed-refs. Here are some stats which illustrate the improvement with this new config when reading packed refs on NFS: trustFolderStat=true trustPackedRefsStat=unset: 0.2ms trustFolderStat=false trustPackedRefsStat=unset: 155ms trustFolderStat=false trustPackedRefsStat=after_open: 1.5ms Change-Id: I00da88e4cceebbcf3475be0fc0011ff65767c111 Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
| | | | * Fix documentation for core.trustFolderStatKaushik Lingarkar2022-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update documentation for core.trustFolderStat to highlight that it is also used when reading the packed-refs file. Change-Id: I3eac377c3a7f48493abc8ae6d0889ee70a05d24d Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
* | | | | GC: disable writing commit-graph for shallow reposkylezhao2023-01-062-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In shallow repos, GC writes to the commit-graph that shallow commits do not have parents. This won't be true after a "git fetch --unshallow" (and before another GC). Do not write the commit-graph from shallow clones of a repo. The commit-graph must have the real metadata of commits and that is not available in a shallow view of the repo. Change-Id: Ic9f2358ddaa607c74f4dbf289c9bf2a2f0af9ce0 Signed-off-by: kylezhao <kylezhao@tencent.com>
* | | | | RefDatabase: fix javadoc formattingMatthias Sohn2023-01-041-29/+35
| | | | | | | | | | | | | | | | | | | | Change-Id: I547819ac380a0e6a88d05206ff171b69f46a8549
* | | | | Pull up additionalRefsNames from RefDirectory to RefDatabaseMatthias Sohn2023-01-043-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables to reuse this constant in all RefDatabase implementations. Change-Id: I13d8fb780de24f71e005b698965fb5bcdbf3c728
* | | | | Add TernarySearchTreeMatthias Sohn2023-01-046-0/+934
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A ternary search tree is a type of tree where nodes are arranged in a manner similar to a binary search tree, but with up to three children rather than the binary tree's limit of two. Each node of a ternary search tree stores a single character, a reference to a value object and references to its three children named equal kid, lo kid and hi kid. The lo kid pointer must point to a node whose character value is less than the current node. The hi kid pointer must point to a node whose character is greater than the current node.[1] The equal kid points to the next character in the word. Each node in a ternary search tree represents a prefix of the stored strings. All strings in the middle subtree of a node start with that prefix. Like other prefix trees, a ternary search tree can be used as an associative map with the ability for incremental string search. Ternary search trees are more space efficient compared to standard prefix trees, at the cost of speed. They allow efficient prefix search which is important to implement searching refs by prefix in a RefDatabase. Searching by prefix returns all keys if the prefix is an empty string. Bug: 576165 Change-Id: If160df70151a8e1c1bd6716ee4968e4c45b2c7ac
* | | | | CommitGraph: teach ObjectReader to get commit-graphkylezhao2023-01-044-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FileRepository's ObjectReader#getCommitGraph will return commit-graph when it exists and core.commitGraph is true. DfsRepository is not supported currently. Change-Id: I992d43d104cf542797e6949470e95e56de025107 Signed-off-by: kylezhao <kylezhao@tencent.com>
* | | | | Merge "CommitGraph: add commit-graph for FileObjectDatabase"Ivan Frade2023-01-037-0/+207
|\ \ \ \ \
| * | | | | CommitGraph: add commit-graph for FileObjectDatabasekylezhao2022-12-237-0/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes JGit can read .git/objects/info/commit-graph file and then get CommitGraph. Loading a new commit-graph into memory requires additional time. After testing, loading a copy of the Linux's commit-graph(1039139 commits) is under 50ms. Bug: 574368 Change-Id: Iadfdd6ed437945d3cdfdbe988cf541198140a8bf Signed-off-by: kylezhao <kylezhao@tencent.com>
* | | | | | PatchApplier: fix handling of last newline in text patchThomas Wolf2022-12-2638-18/+1358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the last line came from the patch, use the patch to determine whether or not there should be a trailing newline. Otherwise use the old text. Add test cases for - no newline at end, last line not in patch hunk - no newline at end, last line in patch hunk - patch removing the last newline - patch adding a newline at the end of file not having one all for core.autocrlf false, true, and input. Add a test case where the "no newline" indicator line is not the last line of the last hunk. This can happen if the patch ends with removals at the file end. Bug: 581234 Change-Id: I09d079b51479b89400ad300d0662c1dcb50deab6 Also-by: Yuriy Mitrofanov <a2terminator@mail.ru> Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | | | | Reformat PatchApplier and PatchApplierTestThomas Wolf2022-12-222-59/+65
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some lines were too long, unnecessary fully qualified class names, and an assertEquals(actual, expected) when it should have been assertEquals(expected, actual). Change-Id: I3b3c46c963afe2fb82a79c1e93970e73778877e5 Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | | | PackWriter#prepareBitmapIndex: add clarifying commentsAnna Papitto2022-12-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New readers of #prepareBitmapIndex may be confused about the manual memory management (hidden mutation and nulling out pointers). Add two clarifying comments to help future readers. Change-Id: I93cab1919066efda37e96c47667f6991f67e377e
* | | | | Merge "IO#readFully: provide overload that fills the full array"Ivan Frade2022-12-192-2/+21
|\ \ \ \ \
| * | | | | IO#readFully: provide overload that fills the full arrayAnna Papitto2022-12-192-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IO#readFully is often called with the intent to fill the destination array from beginning to end. The redundant arguments for where to start and stop filling are opportunities for bugs if specified incorrectly or if not changed to match a changed array length. Provide a overloaded method for filling the full destination array. Change-Id: I964f18f4a061189cce1ca00ff0258669277ff499 Signed-off-by: Anna Papitto <annapapitto@google.com>
* | | | | | Fix API warnings for the new CommitGraphThomas Wolf2022-12-172-1/+13
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark the internal package as internal, visible only to the test bundle. Add an API filter for CoreConfig.DEFAULT_COMMIT_GRAPH_ENABLE. Change-Id: Ib62a93b873c93daf638b6c57e62fd267e16801bb Signed-off-by: Thomas Wolf <twolf@apache.org>
* | | | | PackReverseIndex#findPosition: fix typo in method nameAnna Papitto2022-12-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The package-private findPostion method has a type in it. The typo will become more widespread when a file-based implementation class is introduced. Correct the spelling to findPosition before the file-based implementation is introduced. Change-Id: Ib285f5a3f9a333ace1782dae9b5d425505eb962a Signed-off-by: Anna Papitto <annapapitto@google.com>
* | | | | GC: Write commit-graph files when gckylezhao2022-12-164-0/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If 'core.commitGraph' and 'gc.writeCommitGraph' are both true, then gc will rewrite the commit-graph file when 'git gc' is run. Defaults to false while the commit-graph feature matures. Bug: 574368 Change-Id: Ic94cd69034c524285c938414610f2e152198e06e Signed-off-by: kylezhao <kylezhao@tencent.com>
* | | | | CommitGraph: add core.commitGraph configkylezhao2022-12-163-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3b5e735ebafba09ca18fd83da479c7950fa3ea8d Signed-off-by: kylezhao <kylezhao@tencent.com>
* | | | | Merge "Gc#deleteOrphans: avoid dependence on PackExt alphabetical ordering"Ivan Frade2022-12-162-35/+69
|\ \ \ \ \
| * | | | | Gc#deleteOrphans: avoid dependence on PackExt alphabetical orderingAnna Papitto2022-12-152-35/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deleting orphan files depends on .pack and .keep being reverse-sorted to before the corresponding index files that could be orphans. The new reverse index file extension (.rev) will break that frail dependency. Rewrite Gc#deleteOrphans to avoid that dependence by tracking which pack names have a .pack or .keep file and then deleting any index files that without a corresponding one. This approach takes linear time instead of the O(n logn) time needed for sorting. Change-Id: If83c378ea070b8871d4b01ae008e7bf8270de763 Signed-off-by: Anna Papitto <annapapitto@google.com>
* | | | | | CommitGraph: implement commit-graph readkylezhao2022-12-1613-0/+1216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git introduced a new file storing the topology and some metadata of the commits in the repo (commitGraph). With this data, git can browse commit history without parsing the pack, speeding up e.g. reachability checks. This change teaches JGit to read commit-graph-format file, following the upstream format([1]). JGit can read a commit-graph file from a buffered stream, which means that we can provide this feature for both FileRepository and DfsRepository. [1] https://git-scm.com/docs/commit-graph-format/2.21.0 Bug: 574368 Change-Id: Ib5c0d6678cb242870a0f5841bd413ad3885e95f6 Signed-off-by: kylezhao <kylezhao@tencent.com>
* | | | | | WalkPushConnection: Sanitize paths given to transportsJeremy T. Braun2022-12-151-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These paths are given to the underlying URI-based transports (s3, sftp, http), all of which expect forward-slash as the path separator character. Change-Id: I3cbb5928c9531a4da4691411bd8ac248fdf47ef2
* | | | | | Merge changes Iad832fe1,Icef9658cMatthias Sohn2022-12-1414-214/+116
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: CommitGraphWriter: fix UnusedException errorprone error Update jetty to 10.0.13
| * | | | | | CommitGraphWriter: fix UnusedException errorprone errorMatthias Sohn2022-12-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Errorprone run in the bazel build raised this exception: org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java:105: error: [UnusedException] This catch block catches an exception and re-throws another, but swallows the caught exception rather than setting it as a cause. This can make debugging harder. } catch (InterruptedIOException e) { ^ (see https://errorprone.info/bugpattern/UnusedException) Did you mean 'throw new IOException(JGitText.get().commitGraphWritingCancelled, e);'? Change-Id: Iad832fe17955fc1e60e6a4902bc50fd9dca76b9d
| * | | | | | Update jetty to 10.0.13Matthias Sohn2022-12-1313-213/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Oomph's p2 repo for jetty 10.0.13 doesn't have source bundles, we remove them. Eclipse platform doesn't create p2 repos for jetty anymore and we aren't yet ready to use maven dependencies like the platform does. Change-Id: Icef9658ce441be43931e32d931adf717e2fa222c
* | | | | | | GraphCommits: Remove unused getter by positionIvan Frade2022-12-131-7/+0
| |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CommitGraphWriter uses the GraphCommits in for-each loops and doesn't need the access by position anymore. This was a left-over from https://git.eclipse.org/r/c/jgit/jgit/+/182832 Remove the unused method. Change-Id: I39df9bfab2601d581705ddf4cea3c04ed4765ff9
* | | | | | PackExt: Add a commit graph extension.Xing Huang2022-12-121-1/+4
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no commit graph PackExt because the non-DFS stack is not writing using PackExt mechanism. The extension is needed in DFS to determine the stream to write the commit-graph. Add a commit graph extension that matches the one in cgit (https://git-scm.com/docs/commit-graph#_file_layout) in preparation for adding DFS support for reading and writing commit graphs. Change-Id: Id14eda9f116a319124981e0bcbc533928b1b5e8c Signed-off-by: Xing Huang <xingkhuang@google.com>
* | | | | Merge "commitgraph package: fix exports/imports, add @since tag for new API"Matthias Sohn2022-12-084-0/+6
|\ \ \ \ \
| * | | | | commitgraph package: fix exports/imports, add @since tag for new APIMatthias Sohn2022-12-084-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9175b1d796f91f5ba4e21d3418550ae451c054b0
* | | | | | BatchRefUpdate: Consistent switch branches in ref updateSergey2022-12-081-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The expression RefUpdate ru = newUpdate(cmd) is eagerly evaluated before the switch statement. But it is not used in some switch cases and thus is calculated uselessly. Move expression evaluation to the switch case where it is actually used. After such a move, several cases became identical and thus were squashed. Change-Id: Ifd1976f1c28378e092fb24d7ca9c415cba49f07f
* | | | | | RefWriter#writePackedRefs: Remove a redundant "if" checkSergey2022-12-081-2/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After checking the variable, the same variable was checked again inside the "if" block, and after the first check, this variable does not change. Remove the second unnecessary check. Change-Id: I6a38e67073f7f93105575b8f415ad32d350af602
* | | | | Merge "CommitGraph: implement commit-graph writer"Ivan Frade2022-12-069-0/+800
|\ \ \ \ \