mv: use flags mode for update_mode
As suggested by Derrick [1], move the in-line definition of
"enum update_mode" to the top of the file and make it use "flags"
mode (each state is a different bit in the word).
Change the flag assignments from '=' (single assignment) to '|='
(additive). Also change flag evaluation from '==' to '&', etc.
[1] https://lore.kernel.org/git/
22aadea2-9330-aa9e-7b6a-
834585189144@github.com/
Helped-by: Victoria Dye <redacted>
Helped-by: Derrick Stolee <redacted>
Signed-off-by: Shaoxuan Yuan <redacted>
Acked-by: Derrick Stolee <redacted>
Signed-off-by: Junio C Hamano <redacted>