summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2022-10-06 09:10:15 -0400
committerJunio C Hamano <gitster@pobox.com>2022-10-06 09:56:28 -0700
commit6823c19888a5d1b68da725bf2093dc1155a50afb (patch)
treef38ca6261b744fee3c40521909a931e3f6342d45 /builtin/commit.c
parent3dcec76d9df911ed8321007b1d197c1a206dc164 (diff)
test-submodule: inline resolve_relative_url() function
The resolve_relative_url() function takes argc and argv parameters; it then reads up to 3 elements of argv without looking at argc at all. At first glance, this seems like a bug. But it has only one caller, cmd__submodule_resolve_relative_url(), which does confirm that argc is 3. The main reason this is a separate function is that it was moved from library code in 96a28a9bc6 (submodule--helper: move "resolve-relative-url-test" to a test-tool, 2022-09-01). We can make this code simpler and more obviously safe by just inlining the function in its caller. As a bonus, this silences a -Wunused-parameter warning. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions