]> git.99rst.org Git - git.git/commit
repack: refactor to avoid double-negation of update-server-info
authorPatrick Steinhardt <redacted>
Mon, 14 Mar 2022 07:42:46 +0000 (08:42 +0100)
committerJunio C Hamano <redacted>
Mon, 14 Mar 2022 22:24:59 +0000 (22:24 +0000)
commit64a6151da7fa4b36eb2818047a9b76797e25b46e
tree222091f728c8fe6a6946219834b15025b758f16c
parent4c53a8c20f8984adb226293a3ffd7b88c3f4ac1a
repack: refactor to avoid double-negation of update-server-info

By default, git-repack(1) runs `update_server_info()` to generate info
required for the dumb HTTP protocol. This can be disabled via the `-n`
flag, which then sets the `no_update_server_info` flag. Further down the
code this leads to some double-negation logic, which is about to become
more confusing as we're about to add a new config which allows the user
to permanently disable generation of the info.

Refactor the code to avoid the double-negation and add some tests which
verify that the flag continues to work as expected.

Signed-off-by: Patrick Steinhardt <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/repack.c
t/t7700-repack.sh
git clone https://git.99rst.org/PROJECT