diff options
Diffstat (limited to 'combine-diff.c')
-rw-r--r-- | combine-diff.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/combine-diff.c b/combine-diff.c index b0ece95..d6d6fa1 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -1,14 +1,18 @@ -#include "cache.h" -#include "object-store.h" +#include "git-compat-util.h" +#include "object-store-ll.h" #include "commit.h" -#include "blob.h" +#include "convert.h" #include "diff.h" #include "diffcore.h" +#include "environment.h" +#include "hex.h" +#include "object-name.h" #include "quote.h" #include "xdiff-interface.h" #include "xdiff/xmacros.h" #include "log-tree.h" #include "refs.h" +#include "tree.h" #include "userdiff.h" #include "oid-array.h" #include "revision.h" @@ -332,7 +336,9 @@ static char *grab_blob(struct repository *r, *size = fill_textconv(r, textconv, df, &blob); free_filespec(df); } else { - blob = read_object_file(oid, &type, size); + blob = repo_read_object_file(r, oid, &type, size); + if (!blob) + die(_("unable to read %s"), oid_to_hex(oid)); if (type != OBJ_BLOB) die("object '%s' is not a blob!", oid_to_hex(oid)); } @@ -372,7 +378,7 @@ struct combine_diff_state { static void consume_hunk(void *state_, long ob, long on, long nb, long nn, - const char *funcline, long funclen) + const char *func UNUSED, long funclen UNUSED) { struct combine_diff_state *state = state_; @@ -948,11 +954,11 @@ static void show_combined_header(struct combine_diff_path *elem, "", elem->path, line_prefix, c_meta, c_reset); printf("%s%sindex ", line_prefix, c_meta); for (i = 0; i < num_parent; i++) { - abb = find_unique_abbrev(&elem->parent[i].oid, - abbrev); + abb = repo_find_unique_abbrev(the_repository, + &elem->parent[i].oid, abbrev); printf("%s%s", i ? "," : "", abb); } - abb = find_unique_abbrev(&elem->oid, abbrev); + abb = repo_find_unique_abbrev(the_repository, &elem->oid, abbrev); printf("..%s%s\n", abb, c_reset); if (mode_differs) { |