builtin/index-pack.c: allow stripping arbitrary extensions
authorTaylor Blau <redacted>
Mon, 25 Jan 2021 23:37:22 +0000 (18:37 -0500)
committerJunio C Hamano <redacted>
Tue, 26 Jan 2021 02:32:43 +0000 (18:32 -0800)
commit84d544943c27a1540826730b6a8f588200c65fe6
tree759936b88f8cee9a50084a3795e6fbffadee0afd
parent8ef50d9958f7be21e38026433d30f72521b4de47
builtin/index-pack.c: allow stripping arbitrary extensions

To derive the filename for a .idx file, 'git index-pack' uses
derive_filename() to strip the '.pack' suffix and add the new suffix.

Prepare for stripping off suffixes other than '.pack' by making the
suffix to strip a parameter of derive_filename(). In order to make this
consistent with the "suffix" parameter which does not begin with a ".",
an additional check in derive_filename.

Suggested-by: Jeff King <redacted>
Signed-off-by: Taylor Blau <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/index-pack.c
git clone https://git.99rst.org/PROJECT