Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-05-30 20:30:47 +0300
committerJunio C Hamano <gitster@pobox.com>2017-06-02 03:36:07 +0300
commitc26022ea8f54649ed6b3b545dd3158907abe5d2c (patch)
treea774987137bafa841a9eed9ce3248ef83a8167e0 /diff.c
parentfcf2cfb54b6be34749feb6ffb50fe2bdd7bac8bc (diff)
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 <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/diff.c b/diff.c
index f3546536b4..3fa335f446 100644
--- a/diff.c
+++ b/diff.c
@@ -5081,8 +5081,8 @@ static int is_submodule_ignored(const char *path, struct diff_options *options)
void diff_addremove(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 *concatpath, unsigned dirty_submodule)
{
struct diff_filespec *one, *two;
@@ -5114,9 +5114,9 @@ void diff_addremove(struct diff_options *options,
two = alloc_filespec(concatpath);
if (addremove != '+')
- fill_filespec(one, sha1, sha1_valid, mode);
+ fill_filespec(one, oid->hash, oid_valid, mode);
if (addremove != '-') {
- fill_filespec(two, sha1, sha1_valid, mode);
+ fill_filespec(two, oid->hash, oid_valid, mode);
two->dirty_submodule = dirty_submodule;
}