receive-pack: simplify run_update_post_hook()
authorRené Scharfe <redacted>
Fri, 17 Mar 2017 22:02:13 +0000 (23:02 +0100)
committerJunio C Hamano <redacted>
Sat, 18 Mar 2017 17:13:09 +0000 (10:13 -0700)
commitdce96c41f9d11280ba25ca3927f3e627f03eaf86
tree5f004ab609d339d995ac8dc77e771c0adb436b17
parentc3808ca6982b0ad7ee9b87eca9b50b9a24ec08b0
receive-pack: simplify run_update_post_hook()

Instead of counting the arguments to see if there are any and then
building the full command use a single loop and add the hook command
just before the first argument.  This reduces duplication and overall
code size.

Signed-off-by: Rene Scharfe <redacted>
Reviewed-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/receive-pack.c
git clone https://git.99rst.org/PROJECT