Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit e66a83c

Browse files
author
Christoph Hegemann
authored
document the actual git command needed for ParseCommitGraph (#61132)
I had to track this down through the code, but having it in the doc string should make it easier for the next person.
1 parent f9f633b commit e66a83c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/codeintel/uploads/internal/commitgraph/commit_graph_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestCalculateVisibleUploads(t *testing.T) {
3232
// +--- g
3333
//
3434
// NOTE: The input to ParseCommitGraph must match the order and format
35-
// of `git log --topo-sort`.
35+
// of `git log --pretty="%H %P" --topo-order`.
3636
testGraph := gitdomain.ParseCommitGraph([]string{
3737
"n l",
3838
"m k",

internal/gitserver/gitdomain/commit_graph.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func (c *CommitGraph) Order() []string { return c.order }
1717
// before children. If a commit is listed but has no ancestors then its parent
1818
// slice is empty, but is still present in the map and the ordering. If the
1919
// ordering is to be correct, the git log output must be formatted with
20-
// --topo-order.
20+
// `git log --pretty="%H %P" --topo-order`.
2121
func ParseCommitGraph(lines []string) *CommitGraph {
2222
// Process lines backwards so that we see all parents before children. We get a
2323
// topological ordering by simply scraping the keys off in this order.

0 commit comments

Comments
 (0)