diff options
author | Brandon Williams <bmwill@google.com> | 2017-04-29 02:53:59 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-01 06:19:06 +0300 |
commit | d1a8460caac1a19457e352a6b610b7bc89cd56d9 (patch) | |
tree | dd26307725ea74bd9fcdb66c8c21141d140e4750 /submodule.c | |
parent | 610b233704638372834777ebf6ed3ab8829ec259 (diff) |
submodule: remove add_oid_to_argv()
The function 'add_oid_to_argv()' provides the same functionality as
'append_oid_to_argv()'. Remove this duplicate function and instead use
'append_oid_to_argv()' where 'add_oid_to_argv()' was previously used.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'submodule.c')
-rw-r--r-- | submodule.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/submodule.c b/submodule.c index 46abd52b14..7baa28ae05 100644 --- a/submodule.c +++ b/submodule.c @@ -970,12 +970,6 @@ void check_for_new_submodule_commits(struct object_id *oid) oid_array_append(&ref_tips_after_fetch, oid); } -static int add_oid_to_argv(const struct object_id *oid, void *data) -{ - argv_array_push(data, oid_to_hex(oid)); - return 0; -} - static void calculate_changed_submodule_paths(void) { struct rev_info rev; @@ -989,10 +983,10 @@ static void calculate_changed_submodule_paths(void) init_revisions(&rev, NULL); argv_array_push(&argv, "--"); /* argv[0] program name */ oid_array_for_each_unique(&ref_tips_after_fetch, - add_oid_to_argv, &argv); + append_oid_to_argv, &argv); argv_array_push(&argv, "--not"); oid_array_for_each_unique(&ref_tips_before_fetch, - add_oid_to_argv, &argv); + append_oid_to_argv, &argv); setup_revisions(argv.argc, argv.argv, &rev, NULL); if (prepare_revision_walk(&rev)) die("revision walk setup failed"); |