summaryrefslogtreecommitdiff
path: root/diff-lib.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2015-03-13 23:39:33 +0000
committerJunio C Hamano <gitster@pobox.com>2015-03-13 22:43:13 -0700
commit1ff57c13c54bc9d548178e012f77717f87f2655d (patch)
tree60fc80edc5fe63b258d0da5c74a17eb1bdb8826a /diff-lib.c
parentfa33c3aae238c683b2b15989b9d7f88df19fa93d (diff)
downloadgit-1ff57c13c54bc9d548178e012f77717f87f2655d.tar.gz
diff: convert struct combine_diff_path to object_id
Also, convert a constant to GIT_SHA1_HEXSZ. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff-lib.c')
-rw-r--r--diff-lib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/diff-lib.c b/diff-lib.c
index 875aff8643..470dc7851f 100644
--- a/diff-lib.c
+++ b/diff-lib.c
@@ -124,7 +124,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
dpath->next = NULL;
memcpy(dpath->path, ce->name, path_len);
dpath->path[path_len] = '\0';
- hashclr(dpath->sha1);
+ oidclr(&dpath->oid);
memset(&(dpath->parent[0]), 0,
sizeof(struct combine_diff_parent)*5);
@@ -154,7 +154,7 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
if (2 <= stage) {
int mode = nce->ce_mode;
num_compare_stages++;
- hashcpy(dpath->parent[stage-2].sha1, nce->sha1);
+ hashcpy(dpath->parent[stage-2].oid.hash, nce->sha1);
dpath->parent[stage-2].mode = ce_mode_from_stat(nce, mode);
dpath->parent[stage-2].status =
DIFF_STATUS_MODIFIED;
@@ -335,14 +335,14 @@ static int show_modified(struct rev_info *revs,
memcpy(p->path, new->name, pathlen);
p->path[pathlen] = 0;
p->mode = mode;
- hashclr(p->sha1);
+ oidclr(&p->oid);
memset(p->parent, 0, 2 * sizeof(struct combine_diff_parent));
p->parent[0].status = DIFF_STATUS_MODIFIED;
p->parent[0].mode = new->ce_mode;
- hashcpy(p->parent[0].sha1, new->sha1);
+ hashcpy(p->parent[0].oid.hash, new->sha1);
p->parent[1].status = DIFF_STATUS_MODIFIED;
p->parent[1].mode = old->ce_mode;
- hashcpy(p->parent[1].sha1, old->sha1);
+ hashcpy(p->parent[1].oid.hash, old->sha1);
show_combined_diff(p, 2, revs->dense_combined_merges, revs);
free(p);
return 0;