]> git.ipfire.org Git - thirdparty/git.git/commit
strvec: add functions to replace and remove strings
authorPatrick Steinhardt <ps@pks.im>
Mon, 27 May 2024 11:47:04 +0000 (13:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 May 2024 18:20:02 +0000 (11:20 -0700)
commit11ce77b5cc04e2a42b98f0f9f42d367f50f3b1fc
treede3d223621a5afca4f2d9a24b9d8b280adee2d7c
parent3ef52dd1125b6c9223fd03aca146f6b799e014f9
strvec: add functions to replace and remove strings

Add two functions that allow to replace and remove strings contained in
the strvec. This will be used by a subsequent commit that refactors
git-mv(1).

While at it, add a bunch of unit tests that cover both old and new
functionality.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
strvec.c
strvec.h
t/unit-tests/t-strvec.c [new file with mode: 0644]
t/unit-tests/test-lib.c
t/unit-tests/test-lib.h