PackExt: Add a commit graph extension.

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>
This commit is contained in:
Xing Huang 2022-12-09 16:15:50 -06:00 committed by Ivan Frade
parent e74f3855ad
commit 3a136d2000
1 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,10 @@ public enum PackExt {
REFTABLE("ref"), //$NON-NLS-1$
/** A pack reverse index file extension. */
REVERSE_INDEX("rev"); //$NON-NLS-1$
REVERSE_INDEX("rev"), //$NON-NLS-1$
/** A commit graph file extension. */
COMMIT_GRAPH("graph"); //$NON-NLS-1$
private final String ext;