Skip to content

Commit 1c7d402

Browse files
pcloudsgitster
authored andcommitted
clean: remove redundant variable baselen
baselen used to be the result of common_prefix() when it was made builtin. Since 1d8842d (Add 'fill_directory()' helper function for directory traversal - 2009-05-14), its value will always be zero. Remove it because it's no longer variable. Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5d268ed commit 1c7d402

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/clean.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
3838
{
3939
int i;
4040
int show_only = 0, remove_directories = 0, quiet = 0, ignored = 0;
41-
int ignored_only = 0, baselen = 0, config_set = 0, errors = 0;
41+
int ignored_only = 0, config_set = 0, errors = 0;
4242
int rm_flags = REMOVE_DIR_KEEP_NESTED_GIT;
4343
struct strbuf directory = STRBUF_INIT;
4444
struct dir_struct dir;
@@ -138,7 +138,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
138138
if (pathspec) {
139139
memset(seen, 0, argc > 0 ? argc : 1);
140140
matches = match_pathspec(pathspec, ent->name, len,
141-
baselen, seen);
141+
0, seen);
142142
}
143143

144144
if (S_ISDIR(st.st_mode)) {

0 commit comments

Comments
 (0)