From c26022ea8f54649ed6b3b545dd3158907abe5d2c Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 30 May 2017 10:30:47 -0700 Subject: diff: convert diff_addremove to struct object_id Convert diff_addremove to take a struct object_id. In addtion convert the function pointer type 'add_remove_fn_t' to also take a struct object_id. Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- diff.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'diff.h') diff --git a/diff.h b/diff.h index d75e6d15e..1086975a5 100644 --- a/diff.h +++ b/diff.h @@ -31,8 +31,8 @@ typedef void (*change_fn_t)(struct diff_options *options, typedef void (*add_remove_fn_t)(struct diff_options *options, int addremove, unsigned mode, - const unsigned char *sha1, - int sha1_valid, + const struct object_id *oid, + int oid_valid, const char *fullpath, unsigned dirty_submodule); typedef void (*diff_format_fn_t)(struct diff_queue_struct *q, @@ -247,8 +247,8 @@ extern int diff_can_quit_early(struct diff_options *); extern void diff_addremove(struct diff_options *, int addremove, unsigned mode, - const unsigned char *sha1, - int sha1_valid, + const struct object_id *oid, + int oid_valid, const char *fullpath, unsigned dirty_submodule); extern void diff_change(struct diff_options *, -- cgit v1.2.1 From 94a0097a41f09e00322add6d1cf62b3610b6a85c Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 30 May 2017 10:30:49 -0700 Subject: diff: convert diff_change to struct object_id Convert diff_change to take a struct object_id. In addition convert the function pointer type 'change_fn_t' to also take a struct object_id. Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- diff.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'diff.h') diff --git a/diff.h b/diff.h index 1086975a5..fcf334bb6 100644 --- a/diff.h +++ b/diff.h @@ -23,9 +23,9 @@ typedef int (*pathchange_fn_t)(struct diff_options *options, typedef void (*change_fn_t)(struct diff_options *options, unsigned old_mode, unsigned new_mode, - const unsigned char *old_sha1, - const unsigned char *new_sha1, - int old_sha1_valid, int new_sha1_valid, + const struct object_id *old_oid, + const struct object_id *new_oid, + int old_oid_valid, int new_oid_valid, const char *fullpath, unsigned old_dirty_submodule, unsigned new_dirty_submodule); @@ -253,10 +253,9 @@ extern void diff_addremove(struct diff_options *, extern void diff_change(struct diff_options *, unsigned mode1, unsigned mode2, - const unsigned char *sha1, - const unsigned char *sha2, - int sha1_valid, - int sha2_valid, + const struct object_id *old_oid, + const struct object_id *new_oid, + int old_oid_valid, int new_oid_valid, const char *fullpath, unsigned dirty_submodule1, unsigned dirty_submodule2); -- cgit v1.2.1 From bd25f288767aa26f42ac02d2d36695c8df9134dd Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 30 May 2017 10:30:54 -0700 Subject: diff: convert diff_flush_patch_id to struct object_id Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- diff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'diff.h') diff --git a/diff.h b/diff.h index fcf334bb6..150f1c5a1 100644 --- a/diff.h +++ b/diff.h @@ -354,7 +354,7 @@ extern int run_diff_files(struct rev_info *revs, unsigned int option); extern int run_diff_index(struct rev_info *revs, int cached); extern int do_diff_cache(const struct object_id *, struct diff_options *); -extern int diff_flush_patch_id(struct diff_options *, unsigned char *, int); +extern int diff_flush_patch_id(struct diff_options *, struct object_id *, int); extern int diff_result_code(struct diff_options *, int); -- cgit v1.2.1 From b9acf54dbd2906249abb2a406d466b47da44678e Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 30 May 2017 10:30:55 -0700 Subject: combine-diff: convert diff_tree_combined to struct object_id Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- diff.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'diff.h') diff --git a/diff.h b/diff.h index 150f1c5a1..6aeeda035 100644 --- a/diff.h +++ b/diff.h @@ -236,7 +236,7 @@ struct combine_diff_path { extern void show_combined_diff(struct combine_diff_path *elem, int num_parent, int dense, struct rev_info *); -extern void diff_tree_combined(const unsigned char *sha1, const struct oid_array *parents, int dense, struct rev_info *rev); +extern void diff_tree_combined(const struct object_id *oid, const struct oid_array *parents, int dense, struct rev_info *rev); extern void diff_tree_combined_merge(const struct commit *commit, int dense, struct rev_info *rev); -- cgit v1.2.1 From 7b8dea0c7570a2028f204498c82c8ca7ec6950e3 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 30 May 2017 10:30:57 -0700 Subject: tree-diff: convert diff_root_tree_sha1 to struct object_id Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- diff.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'diff.h') diff --git a/diff.h b/diff.h index 6aeeda035..8d46a6709 100644 --- a/diff.h +++ b/diff.h @@ -215,8 +215,8 @@ extern struct combine_diff_path *diff_tree_paths( struct strbuf *base, struct diff_options *opt); extern int diff_tree_sha1(const unsigned char *old, const unsigned char *new, const char *base, struct diff_options *opt); -extern int diff_root_tree_sha1(const unsigned char *new, const char *base, - struct diff_options *opt); +extern int diff_root_tree_oid(const struct object_id *new_oid, const char *base, + struct diff_options *opt); struct combine_diff_path { struct combine_diff_path *next; -- cgit v1.2.1 From 66f414f885aa6f44ae9e764bdd3e3cd7bd80c5a3 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 30 May 2017 10:31:03 -0700 Subject: diff-tree: convert diff_tree_sha1 to struct object_id Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- diff.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'diff.h') diff --git a/diff.h b/diff.h index 8d46a6709..e0b503460 100644 --- a/diff.h +++ b/diff.h @@ -213,8 +213,9 @@ extern struct combine_diff_path *diff_tree_paths( struct combine_diff_path *p, const unsigned char *sha1, const unsigned char **parent_sha1, int nparent, struct strbuf *base, struct diff_options *opt); -extern int diff_tree_sha1(const unsigned char *old, const unsigned char *new, - const char *base, struct diff_options *opt); +extern int diff_tree_oid(const struct object_id *old_oid, + const struct object_id *new_oid, + const char *base, struct diff_options *opt); extern int diff_root_tree_oid(const struct object_id *new_oid, const char *base, struct diff_options *opt); -- cgit v1.2.1 From fda94b416ed07988e645cec22bf61742d4dd5c95 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 30 May 2017 10:31:06 -0700 Subject: tree-diff: convert diff_tree_paths to struct object_id Signed-off-by: Brandon Williams Signed-off-by: Junio C Hamano --- diff.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'diff.h') diff --git a/diff.h b/diff.h index e0b503460..0d0c14f28 100644 --- a/diff.h +++ b/diff.h @@ -210,8 +210,8 @@ const char *diff_line_prefix(struct diff_options *); extern const char mime_boundary_leader[]; extern struct combine_diff_path *diff_tree_paths( - struct combine_diff_path *p, const unsigned char *sha1, - const unsigned char **parent_sha1, int nparent, + struct combine_diff_path *p, const struct object_id *oid, + const struct object_id **parents_oid, int nparent, struct strbuf *base, struct diff_options *opt); extern int diff_tree_oid(const struct object_id *old_oid, const struct object_id *new_oid, -- cgit v1.2.1