receive-pack: switch global variable 'commands' to a parameter
authorJay Soffian <jaysoffian@gmail.com>
Mon, 19 Apr 2010 22:08:30 +0000 (18:08 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Apr 2010 05:18:36 +0000 (22:18 -0700)
commit5e1c71fd1488a33680c313f287b88d9f7a7d3e45
tree7152cd201b6b54f2a805c62136cc3c349ac76553
parentf78683f3a85ca16ae16e1180703d3280b272f45d
receive-pack: switch global variable 'commands' to a parameter

Receive-pack is inconsistent in its usage of the 'commands'
variable; though it is setup as a global and accessed that way by
execute_commands(), report(), and run_receive_hook(), it is also
passed as a parameter to delete_only() and run_update_post_hook().

For consistency, make it local to cmd_receive_pack and pass it as a
parameter. As long as we're cleaning up, also make our use of the
names 'commands' and 'cmd' consistent.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-receive-pack.c