You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12
12
- Added endpoint for searching commit history for a git repository. [#625](https://github.com/sourcebot-dev/sourcebot/pull/625)
13
13
- Added `pushedAt` field to the Repo table to track when a repository last was committed to across all branches. [#790](https://github.com/sourcebot-dev/sourcebot/pull/790)
14
14
15
+
### Changed
16
+
- Added commit graph generation to improve performance for commit traversal operations. [#791](https://github.com/sourcebot-dev/sourcebot/pull/791)
Copy file name to clipboardExpand all lines: docs/docs/connections/local-repos.mdx
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,6 @@ To get Sourcebot to index these repositories:
55
55
56
56
## Examples
57
57
58
-
59
58
<AccordionGroup>
60
59
<Accordiontitle="Sync individual repo">
61
60
```json
@@ -76,6 +75,22 @@ To get Sourcebot to index these repositories:
76
75
</Accordion>
77
76
</AccordionGroup>
78
77
78
+
## Optimizing git operations
79
+
80
+
Sourcebot performs a number of operations that require traversing a repository's entire commit history (e.g., `git rev-list --count HEAD`). These operations can be slow in repositories with a large number of commits.
81
+
82
+
Typically, a [commit graph](https://git-scm.com/docs/commit-graph) is generated to speed up these operations (see [#791](https://github.com/sourcebot-dev/sourcebot/pull/791)). However, since local repositories are treated as read-only, Sourcebot **will not** generate a commit graph for them.
83
+
84
+
A commit graph can be manually generated by running the following command in the repository's root directory:
85
+
```sh
86
+
git commit-graph write --reachable
87
+
```
88
+
89
+
The commit graph can be updated when fetching with `--write-commit-graph`:
0 commit comments