]> git.ipfire.org Git - thirdparty/git.git/commit - fetch-pack.c
shallow: extract a header file for shallow-related functions
authorTaylor Blau <me@ttaylorr.com>
Thu, 30 Apr 2020 19:48:50 +0000 (13:48 -0600)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Apr 2020 21:19:13 +0000 (14:19 -0700)
commit120ad2b0f13b60266fec9760bba3b5abfcd6fb78
treec966775ae5c66ee3264655227ca7184920900982
parent183df649ca6f10d07a6d155761eef2d52a4f39cd
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>
16 files changed:
builtin/fetch.c
builtin/pack-objects.c
builtin/prune.c
builtin/receive-pack.c
builtin/repack.c
builtin/rev-parse.c
commit-graph.c
commit.c
commit.h
environment.c
fetch-pack.c
git.c
send-pack.c
shallow.c
shallow.h [new file with mode: 0644]
upload-pack.c