Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2023-11-10 13:01:24 +0300
committerJunio C Hamano <gitster@pobox.com>2023-11-11 03:21:00 +0300
commit47c39c28bc1a0001e4341ae70629adcb10f425cc (patch)
tree003f082c15b11ebc24f7c8bf95d5bfbb719a7cda /Makefile
parent88983946fa00ebea8b346acab46e19bceeed427d (diff)
contrib/subtree: convert subtree type check to use case statement
The `subtree_for_commit ()` helper function asserts that the subtree identified by its parameters are either a commit or tree. This is done via the `-o` parameter of test, which is discouraged. Refactor the code to instead use a switch statement over the type. Despite being aligned with our coding guidelines, the resulting code is arguably also easier to read. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions