summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-02-13 21:39:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-13 21:39:10 (GMT)
commit9238941618a3d10f77d20e7f2a72533e701eb18f (patch)
tree36047b304b012cd39a13194d8a3e1fcadf5e2546 /cache.h
parent3efeec3a75995eb7d3b250f58535023db6c261e7 (diff)
parent3449847168c9fa6e23db364e7da9077eadd39547 (diff)
downloadgit-9238941618a3d10f77d20e7f2a72533e701eb18f.zip
git-9238941618a3d10f77d20e7f2a72533e701eb18f.tar.gz
git-9238941618a3d10f77d20e7f2a72533e701eb18f.tar.bz2
Merge branch 'cc/sha1-file-name'
Code clean-up. * cc/sha1-file-name: sha1_file: improve sha1_file_name() perfs sha1_file: remove static strbuf from sha1_file_name()
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/cache.h b/cache.h
index 7414eb4..8cdcee5 100644
--- a/cache.h
+++ b/cache.h
@@ -960,12 +960,10 @@ extern void check_repository_format(void);
#define TYPE_CHANGED 0x0040
/*
- * Return the name of the file in the local object database that would
- * be used to store a loose object with the specified sha1. The
- * return value is a pointer to a statically allocated buffer that is
- * overwritten each time the function is called.
+ * Put in `buf` the name of the file in the local object database that
+ * would be used to store a loose object with the specified sha1.
*/
-extern const char *sha1_file_name(const unsigned char *sha1);
+extern void sha1_file_name(struct strbuf *buf, const unsigned char *sha1);
/*
* Return an abbreviated sha1 unique within this repository's object database.