summaryrefslogtreecommitdiff
path: root/builtin/repack.c
diff options
context:
space:
mode:
authorLibravatar Taylor Blau <me@ttaylorr.com>2020-04-30 13:48:50 -0600
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-04-30 14:19:13 -0700
commit120ad2b0f13b60266fec9760bba3b5abfcd6fb78 (patch)
treec966775ae5c66ee3264655227ca7184920900982 /builtin/repack.c
parentcommit: make 'commit_graft_pos' non-static (diff)
downloadtgif-120ad2b0f13b60266fec9760bba3b5abfcd6fb78.tar.xz
shallow: extract a header file for shallow-related functions
There are many functions in commit.h that are more related to shallow repositories than they are to any sort of generic commit machinery. Likely this began when there were only a few shallow-related functions, and commit.h seemed a reasonable enough place to put them. But, now there are a good number of shallow-related functions, and placing them all in 'commit.h' doesn't make sense. This patch extracts a 'shallow.h', which takes all of the declarations from 'commit.h' for functions which already exist in 'shallow.c'. We will bring the remaining shallow-related functions defined in 'commit.c' in a subsequent patch. For now, move only the ones that already are implemented in 'shallow.c', and update the necessary includes. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/repack.c')
-rw-r--r--builtin/repack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/repack.c b/builtin/repack.c
index 0781763b06..2550603608 100644
--- a/builtin/repack.c
+++ b/builtin/repack.c
@@ -12,6 +12,7 @@
#include "packfile.h"
#include "object-store.h"
#include "promisor-remote.h"
+#include "shallow.h"
static int delta_base_offset = 1;
static int pack_kept_objects = -1;