]> git.ipfire.org Git - thirdparty/git.git/commit
sequencer: use repository parameter in short_commit_name()
authorJeff King <peff@peff.net>
Tue, 29 Aug 2023 23:43:39 +0000 (19:43 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 30 Aug 2023 00:56:23 +0000 (17:56 -0700)
commitcb646ffb0aff30cec6cd47d43df8ba33c320afd9
treef4821c7a83cb0b64712a3d74ff92afdd71f40db1
parent6807fcfedab84bc8cd0fbf721bc13c4e68cda9ae
sequencer: use repository parameter in short_commit_name()

Instead of just using the_repository, we can take a repository parameter
from the caller. Most of them already have one, and doing so clears up a
few -Wunused-parameter warnings. There are still a few callers which use
the_repository, but this pushes us one small step forward to eventually
getting rid of those.

Note that a few of these functions have a "rev_info" whose "repo"
parameter could probably be used instead of the_repository. I'm leaving
that for further cleanups, as it's not immediately obvious that
revs->repo is always valid, and there's quite a bit of other possible
refactoring here (even getting rid of some "struct repository" arguments
in favor of revs->repo).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c