add: make pathless 'add [-u|-A]' warning a file-global function
authorJonathan Nieder <redacted>
Tue, 19 Mar 2013 22:45:26 +0000 (15:45 -0700)
committerJunio C Hamano <redacted>
Wed, 20 Mar 2013 14:41:42 +0000 (07:41 -0700)
commite24afab09137d785f07e62aee8936b548436d21f
tree01e48338246224850ba99bcf8e82c23e16add1d7
parent7bf7a92f69f8b0af7169af390e53397698fcfa95
add: make pathless 'add [-u|-A]' warning a file-global function

Currently warn_pathless_add() is only called directly by cmd_add(),
but that is about to change.  Move its definition higher in the file
and pass the "--update" or "--all" option name used in its message
through globals instead of function arguments to make it easier to
call without passing values that will not change through the call
chain.

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