diff options
author | Junio C Hamano <gitster@pobox.com> | 2018-02-14 00:39:10 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-14 00:39:10 +0300 |
commit | 9238941618a3d10f77d20e7f2a72533e701eb18f (patch) | |
tree | 36047b304b012cd39a13194d8a3e1fcadf5e2546 /cache.h | |
parent | 3efeec3a75995eb7d3b250f58535023db6c261e7 (diff) | |
parent | 3449847168c9fa6e23db364e7da9077eadd39547 (diff) |
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.h | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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. |