Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
sha1-name.c: remove the_repo from find_abbrev_len_packed()
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Tue, 16 Apr 2019 09:33:21 +0000
(16:33 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 16 Apr 2019 09:56:52 +0000
(18:56 +0900)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1-name.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
fae2ae4
)
diff --git
a/sha1-name.c
b/sha1-name.c
index 7558ce51a3671fb13c82673d3611a8b7e21c4448..b9381aaba6fd8e2c919d05d6d223a9e9faea24de 100644
(file)
--- a/
sha1-name.c
+++ b/
sha1-name.c
@@
-514,6
+514,7
@@
struct min_abbrev_data {
unsigned int init_len;
unsigned int cur_len;
char *hex;
unsigned int init_len;
unsigned int cur_len;
char *hex;
+ struct repository *repo;
const struct object_id *oid;
};
const struct object_id *oid;
};
@@
-619,9
+620,9
@@
static void find_abbrev_len_packed(struct min_abbrev_data *mad)
struct multi_pack_index *m;
struct packed_git *p;
struct multi_pack_index *m;
struct packed_git *p;
- for (m = get_multi_pack_index(
the_repository
); m; m = m->next)
+ for (m = get_multi_pack_index(
mad->repo
); m; m = m->next)
find_abbrev_len_for_midx(m, mad);
find_abbrev_len_for_midx(m, mad);
- for (p = get_packed_git(
the_repository
); p; p = p->next)
+ for (p = get_packed_git(
mad->repo
); p; p = p->next)
find_abbrev_len_for_pack(p, mad);
}
find_abbrev_len_for_pack(p, mad);
}
@@
-658,6
+659,7
@@
int find_unique_abbrev_r(char *hex, const struct object_id *oid, int len)
if (len == hexsz || !len)
return hexsz;
if (len == hexsz || !len)
return hexsz;
+ mad.repo = the_repository;
mad.init_len = len;
mad.cur_len = len;
mad.hex = hex;
mad.init_len = len;
mad.cur_len = len;
mad.hex = hex;