summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-05-13 23:26:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-05-13 23:26:11 (GMT)
commit52371bf4490c84873f643d2c3c85ac2788e95a31 (patch)
treef1446e9059b0de4f06bdbf6005fc7554a3f4f734
parent47fa10661746e32cbc76a88392e1cda38def27c6 (diff)
parent3a7f0908b6d698ab1287840ea604111c28a67a61 (diff)
downloadgit-52371bf4490c84873f643d2c3c85ac2788e95a31.zip
git-52371bf4490c84873f643d2c3c85ac2788e95a31.tar.gz
git-52371bf4490c84873f643d2c3c85ac2788e95a31.tar.bz2
Merge branch 'mt/clean-clean'
Code clean-up. * mt/clean-clean: clean: remove unnecessary variable
-rw-r--r--builtin/clean.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/clean.c b/builtin/clean.c
index 995053b..f6d7e81 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -1003,7 +1003,6 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
for (i = 0; i < dir.nr; i++) {
struct dir_entry *ent = dir.entries[i];
- int matches = 0;
struct stat st;
const char *rel;
@@ -1013,8 +1012,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
if (lstat(ent->name, &st))
die_errno("Cannot lstat '%s'", ent->name);
- if (S_ISDIR(st.st_mode) && !remove_directories &&
- matches != MATCHED_EXACTLY)
+ if (S_ISDIR(st.st_mode) && !remove_directories)
continue;
rel = relative_path(ent->name, prefix, &buf);