diff --git a/builtin-ls-tree.c b/builtin-ls-tree.c
index 261147fdbe76cf9d277bd420cc17efedecc2da2f..6472610ac2fecb8096ecab8fe29331a6fd6c009b 100644 (file)
--- a/builtin-ls-tree.c
+++ b/builtin-ls-tree.c
#define LS_TREE_ONLY 2
#define LS_SHOW_TREES 4
#define LS_NAME_ONLY 8
-static int abbrev = 0;
-static int ls_options = 0;
+static int abbrev;
+static int ls_options;
static const char **pathspec;
-static int chomp_prefix = 0;
+static int chomp_prefix;
static const char *ls_tree_prefix;
static const char ls_tree_usage[] =
chomp_prefix = 0;
break;
}
- if (!strncmp(argv[1]+2, "abbrev=",7)) {
+ if (!prefixcmp(argv[1]+2, "abbrev=")) {
abbrev = strtoul(argv[1]+9, NULL, 10);
if (abbrev && abbrev < MINIMUM_ABBREV)
abbrev = MINIMUM_ABBREV;