diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-08-13 18:14:21 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-13 14:14:42 -0700 |
commit | 7f944e264ebe2fcf9a2c228a9fc9463ab3274d39 (patch) | |
tree | b745e284c241468980b72f7bfd7038dce8757eab /builtin/cat-file.c | |
parent | attr: remove an implicit dependency on the_index (diff) | |
download | tgif-7f944e264ebe2fcf9a2c228a9fc9463ab3274d39.tar.xz |
convert.c: remove an implicit dependency on the_index
Make the convert API take an index_state instead of assuming the_index
in convert.c. All external call sites are converted blindly to keep
the patch simple and retain current behavior. Individual call sites
may receive further updates to use the right index instead of
the_index.
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 'builtin/cat-file.c')
-rw-r--r-- | builtin/cat-file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 4a44b2404f..c726ee1092 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@ -39,7 +39,7 @@ static int filter_object(const char *path, unsigned mode, oid_to_hex(oid), path); if ((type == OBJ_BLOB) && S_ISREG(mode)) { struct strbuf strbuf = STRBUF_INIT; - if (convert_to_working_tree(path, *buf, *size, &strbuf)) { + if (convert_to_working_tree(&the_index, path, *buf, *size, &strbuf)) { free(*buf); *size = strbuf.len; *buf = strbuf_detach(&strbuf, NULL); |