diff options
author | Stefan Beller <sbeller@google.com> | 2018-03-23 20:21:16 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-26 20:05:55 +0300 |
commit | a68377b5dedbe7e5230901577eac9b9a00cb26b4 (patch) | |
tree | 59f00895162ba14b68cf64b9c35a3771905b9dcb /sha1_file.c | |
parent | e977fc7469d0524b31eea22431b7c6ef6616741f (diff) |
sha1_file: allow sha1_file_name to handle arbitrary repositories
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sha1_file.c b/sha1_file.c index 74c68ea776..aed9a558c5 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -323,9 +323,9 @@ static void fill_sha1_path(struct strbuf *buf, const unsigned char *sha1) } } -void sha1_file_name_the_repository(struct strbuf *buf, const unsigned char *sha1) +void sha1_file_name(struct repository *r, struct strbuf *buf, const unsigned char *sha1) { - strbuf_addstr(buf, get_object_directory()); + strbuf_addstr(buf, r->objects->objectdir); strbuf_addch(buf, '/'); fill_sha1_path(buf, sha1); } |