diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-05-06 22:10:37 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-08 15:12:58 +0900 |
commit | a9dbc179100b7119cb44eb5b4adcb47967f346a6 (patch) | |
tree | 8c09732c9f70c38bde9256781b984d13d8518043 /builtin/merge.c | |
parent | 48be4c625bf0f35309fdf501f47eb7445a9f5494 (diff) | |
download | git-a9dbc179100b7119cb44eb5b4adcb47967f346a6.tar.gz |
tree: convert parse_tree_indirect to struct object_id
Convert parse_tree_indirect to take a pointer to struct object_id.
Update all the callers. This transformation was achieved using the
following semantic patch and manual updates to the declaration and
definition. Update builtin/checkout.c manually as well, since it uses a
ternary expression not handled by the semantic patch.
@@
expression E1;
@@
- parse_tree_indirect(E1.hash)
+ parse_tree_indirect(&E1)
@@
expression E1;
@@
- parse_tree_indirect(E1->hash)
+ parse_tree_indirect(E1)
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/merge.c')
-rw-r--r-- | builtin/merge.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/merge.c b/builtin/merge.c index 5ea7f7da9a..a4a098f40f 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -605,13 +605,13 @@ static int read_tree_trivial(struct object_id *common, struct object_id *head, opts.verbose_update = 1; opts.trivial_merges_only = 1; opts.merge = 1; - trees[nr_trees] = parse_tree_indirect(common->hash); + trees[nr_trees] = parse_tree_indirect(common); if (!trees[nr_trees++]) return -1; - trees[nr_trees] = parse_tree_indirect(head->hash); + trees[nr_trees] = parse_tree_indirect(head); if (!trees[nr_trees++]) return -1; - trees[nr_trees] = parse_tree_indirect(one->hash); + trees[nr_trees] = parse_tree_indirect(one); if (!trees[nr_trees++]) return -1; opts.fn = threeway_merge; |