aboutsummaryrefslogtreecommitdiff
path: root/cache.h
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 /cache.h
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 'cache.h')
-rw-r--r--cache.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/cache.h b/cache.h
index ab3b52ff9..dbc02ad81 100644
--- a/cache.h
+++ b/cache.h
@@ -903,20 +903,6 @@ extern void check_repository_format(void);
extern const char *sha1_file_name(const unsigned char *sha1);
/*
- * Return the name of the (local) packfile with the specified sha1 in
- * its name. The return value is a pointer to memory that is
- * overwritten each time this function is called.
- */
-extern char *sha1_pack_name(const unsigned char *sha1);
-
-/*
- * Return the name of the (local) pack index file with the specified
- * sha1 in its name. The return value is a pointer to memory that is
- * overwritten each time this function is called.
- */
-extern char *sha1_pack_index_name(const unsigned char *sha1);
-
-/*
* Return an abbreviated sha1 unique within this repository's object database.
* The result will be at least `len` characters long, and will be NUL
* terminated.
@@ -1651,15 +1637,6 @@ extern void pack_report(void);
extern int odb_mkstemp(struct strbuf *template, const char *pattern);
/*
- * Generate the filename to be used for a pack file with checksum "sha1" and
- * extension "ext". The result is written into the strbuf "buf", overwriting
- * any existing contents. A pointer to buf->buf is returned as a convenience.
- *
- * Example: odb_pack_name(out, sha1, "idx") => ".git/objects/pack/pack-1234..idx"
- */
-extern char *odb_pack_name(struct strbuf *buf, const unsigned char *sha1, const char *ext);
-
-/*
* Create a pack .keep file named "name" (which should generally be the output
* of odb_pack_name). Returns a file descriptor opened for writing, or -1 on
* error.