From 3a136d2000cc0741c8a0c5ea0f64ec1c0796f3f8 Mon Sep 17 00:00:00 2001 From: Xing Huang Date: Fri, 9 Dec 2022 16:15:50 -0600 Subject: [PATCH] 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 --- .../src/org/eclipse/jgit/internal/storage/pack/PackExt.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java index c006995c5..1d02c0279 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java @@ -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;