aboutsummaryrefslogtreecommitdiffstats
path: root/commit-graph.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-08-29 19:44:23 -0400
committerJunio C Hamano <gitster@pobox.com>2023-08-29 17:56:23 -0700
commitc9f7b1e8f27fac13656eba21261a4a12df23c751 (patch)
treec71d7dc844f537c013ee16a6f2e73a7acfabb647 /commit-graph.c
parentsequencer: use repository parameter in short_commit_name() (diff)
downloadgit-c9f7b1e8f27fac13656eba21261a4a12df23c751.tar.gz
git-c9f7b1e8f27fac13656eba21261a4a12df23c751.zip
sequencer: mark repository argument as unused
In sequencer_get_last_command(), we don't ever look at the repository parameter. This is due to ed5b1ca10b (status: do not report errors in sequencer/todo, 2019-06-27), which dropped the call to parse_insn_line(). However, it _should_ be used when calling into git_path_* functions, but the one we use here is declared with the non-REPO variant of GIT_PATH_FUNC(), and so just uses the_repository internally. We could change the path helper to use REPO_GIT_PATH_FUNC(), but doing so piecemeal is not great. There are 41 uses of GIT_PATH_FUNC() in sequencer.c, and inconsistently switching one makes the code more confusing. Likewise, this one function is used in half a dozen other spots, all of which would need to start passing in a repository argument (with rippling effects up the call stack). So let's punt on that for now and just silence any -Wunused-parameter warning. Note that we could also drop this parameter entirely, as the function is always called directly, and not as a callback that has to conform to some external interface. But since we'd eventually want to use the repository parameter, let's leave it in place to avoid disrupting the callers twice. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
0 files changed, 0 insertions, 0 deletions