aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2017-08-18 15:20:16 -0700
committerJunio C Hamano <gitster@pobox.com>2017-08-23 15:12:06 -0700
commit4f39cd821d1756f5f6d145f987576660136931ee (patch)
treec7a0b1de6a17b1336f82bbbd598d766e6d0030e3 /builtin
parent39566494226919aa18951f2abff6491f5547d377 (diff)
downloadgit-4f39cd821d1756f5f6d145f987576660136931ee.tar.gz
git-4f39cd821d1756f5f6d145f987576660136931ee.tar.xz
pack: move pack name-related functions
Currently, sha1_file.c and cache.h contain many functions, both related to and unrelated to packfiles. This makes both files very large and causes an unclear separation of concerns. Create a new file, packfile.c, to hold all packfile-related functions currently in sha1_file.c. It has a corresponding header packfile.h. In this commit, the pack name-related functions are moved. Subsequent commits will move the other functions. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/index-pack.c1
-rw-r--r--builtin/pack-redundant.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 26828c1d8..f2be145e1 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -12,6 +12,7 @@
#include "exec_cmd.h"
#include "streaming.h"
#include "thread-utils.h"
+#include "packfile.h"
static const char index_pack_usage[] =
"git index-pack [-v] [-o <index-file>] [--keep | --keep=<msg>] [--verify] [--strict] (<pack-file> | --stdin [--fix-thin] [<pack-file>])";
diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
index cb1df1c76..aaa813632 100644
--- a/builtin/pack-redundant.c
+++ b/builtin/pack-redundant.c
@@ -7,6 +7,7 @@
*/
#include "builtin.h"
+#include "packfile.h"
#define BLKSIZE 512