forked from gitgitgadget/git
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit-graph: implement git commit-graph read
Teach git-commit-graph to read commit graph files and summarize their contents. Use the read subcommand to verify the contents of a commit graph file in the tests. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
- Loading branch information
1 parent
f237c8b
commit 2a2e32b
Showing
5 changed files
with
254 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,29 @@ | ||
#ifndef COMMIT_GRAPH_H | ||
#define COMMIT_GRAPH_H | ||
|
||
#include "git-compat-util.h" | ||
|
||
char *get_commit_graph_filename(const char *obj_dir); | ||
|
||
struct commit_graph { | ||
int graph_fd; | ||
|
||
const unsigned char *data; | ||
size_t data_len; | ||
|
||
unsigned char hash_len; | ||
unsigned char num_chunks; | ||
uint32_t num_commits; | ||
struct object_id oid; | ||
|
||
const uint32_t *chunk_oid_fanout; | ||
const unsigned char *chunk_oid_lookup; | ||
const unsigned char *chunk_commit_data; | ||
const unsigned char *chunk_large_edges; | ||
}; | ||
|
||
struct commit_graph *load_commit_graph_one(const char *graph_file); | ||
|
||
void write_commit_graph(const char *obj_dir); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters