diff mbox series

[RFC/REVIEW,4/7] ls-tree: remove unused "MODE_UNSPECIFIED"

Message ID patch-4.7-05959f0fe4c-20220310T134811Z-avarab@gmail.com (mailing list archive)
State New, archived
Headers show
Series fixups/suggestions/musings for tl/ls-tree-oid-only | expand

Commit Message

Ævar Arnfjörð Bjarmason March 10, 2022, 1:57 p.m. UTC
Remove the "MODE_UNSPECIFIED" added in a preceding commit. We don't
need it, instead let's start the "command mode" enum at 1, as
e.g. builtin/help.c does for its similar pattern.

In addition let's change this from "mutx_option" to a more obvious
"ls-tree_cmdmode", even if the type name isn't used anywhere else. The
previous name sounded as though it had something to do with
a (thread?) mutex.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 builtin/ls-tree.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/builtin/ls-tree.c b/builtin/ls-tree.c
index f04733a9be1..95816709d38 100644
--- a/builtin/ls-tree.c
+++ b/builtin/ls-tree.c
@@ -49,11 +49,10 @@  static const  char * const ls_tree_usage[] = {
 	NULL
 };
 
-static enum mutx_option {
-	MODE_UNSPECIFIED = 0,
+static enum ls_tree_cmdmode {
+	MODE_LONG = 1,
 	MODE_NAME_ONLY,
 	MODE_OBJECT_ONLY,
-	MODE_LONG,
 } cmdmode;
 
 static void expand_objectsize(struct strbuf *line, const struct object_id *oid,