1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-06 14:36:18 +02:00

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>
This commit is contained in:
Brandon Williams 2017-04-28 16:53:59 -07:00 committed by Junio C Hamano
parent 610b233704
commit d1a8460caa

View File

@ -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");