]> git.99rst.org Git - git.git/commit
mv: use flags mode for update_mode
authorShaoxuan Yuan <redacted>
Thu, 30 Jun 2022 02:37:36 +0000 (10:37 +0800)
committerJunio C Hamano <redacted>
Fri, 1 Jul 2022 21:50:16 +0000 (14:50 -0700)
commit24ea81d9ac401731c222b28097b339aa0d2d316d
treeafb2ee25268265b4c6f465d41a3a486404c0f643
parent8a26a3915fbe1aab9786b28c535c8541f8df2a19
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>
builtin/mv.c
git clone https://git.99rst.org/PROJECT