summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-05-30 17:30:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-02 00:36:06 (GMT)
commitfcf2cfb54b6be34749feb6ffb50fe2bdd7bac8bc (patch)
treecbc5ab8f0bec9ebec4fc0fc0a356085f45a5d81d
parent362d7659150511cb8ef0f4af690d39881f53822d (diff)
downloadgit-fcf2cfb54b6be34749feb6ffb50fe2bdd7bac8bc.zip
git-fcf2cfb54b6be34749feb6ffb50fe2bdd7bac8bc.tar.gz
git-fcf2cfb54b6be34749feb6ffb50fe2bdd7bac8bc.tar.bz2
diff: convert diff_index_show_file to struct object_id
Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--diff-lib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/diff-lib.c b/diff-lib.c
index a3bc781..2c838aa 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -255,12 +255,12 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
static void diff_index_show_file(struct rev_info *revs,
const char *prefix,
const struct cache_entry *ce,
- const unsigned char *sha1, int sha1_valid,
+ const struct object_id *oid, int oid_valid,
unsigned int mode,
unsigned dirty_submodule)
{
diff_addremove(&revs->diffopt, prefix[0], mode,
- sha1, sha1_valid, ce->name, dirty_submodule);
+ oid->hash, oid_valid, ce->name, dirty_submodule);
}
static int get_stat_data(const struct cache_entry *ce,
@@ -315,7 +315,7 @@ static void show_new_file(struct rev_info *revs,
&dirty_submodule, &revs->diffopt) < 0)
return;
- diff_index_show_file(revs, "+", new, oid->hash, !is_null_oid(oid), mode, dirty_submodule);
+ diff_index_show_file(revs, "+", new, oid, !is_null_oid(oid), mode, dirty_submodule);
}
static int show_modified(struct rev_info *revs,
@@ -332,7 +332,7 @@ static int show_modified(struct rev_info *revs,
&dirty_submodule, &revs->diffopt) < 0) {
if (report_missing)
diff_index_show_file(revs, "-", old,
- old->oid.hash, 1, old->ce_mode,
+ &old->oid, 1, old->ce_mode,
0);
return -1;
}
@@ -426,7 +426,7 @@ static void do_oneway_diff(struct unpack_trees_options *o,
* Something removed from the tree?
*/
if (!idx) {
- diff_index_show_file(revs, "-", tree, tree->oid.hash, 1,
+ diff_index_show_file(revs, "-", tree, &tree->oid, 1,
tree->ce_mode, 0);
return;
}