{"thread":{"id":"25748","subject":"[PATCH] clean: remove redundant variable baselen","startedAt":"2010-11-15T06:42:44Z","lastAt":"2010-11-15T06:42:44Z","messageCount":1,"participants":["Nguyễn Thái Ngọc Duy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"155907","messageId":"1289803364-16452-1-git-send-email-pclouds@gmail.com","threadId":"25748","inReplyTo":null,"subject":"[PATCH] clean: remove redundant variable baselen","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2010-11-15T06:42:44Z","receivedAt":"2010-11-15T06:42:44Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"baselen used to be the result of common_prefix() when it was made\nbuiltin. Since 1d8842d (Add 'fill_directory()' helper function for\ndirectory traversal - 2009-05-14), its value will always be\nzero. Remove it because it's no longer variable.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n Or bring common_prefix() back. I'm not sure if it's worth it.\n\n builtin/clean.c |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/clean.c b/builtin/clean.c\nindex c8798f5..5200cca 100644\n--- a/builtin/clean.c\n+++ b/builtin/clean.c\n@@ -38,7 +38,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)\n {\n \tint i;\n \tint show_only = 0, remove_directories = 0, quiet = 0, ignored = 0;\n-\tint ignored_only = 0, baselen = 0, config_set = 0, errors = 0;\n+\tint ignored_only = 0, config_set = 0, errors = 0;\n \tint rm_flags = REMOVE_DIR_KEEP_NESTED_GIT;\n \tstruct strbuf directory = STRBUF_INIT;\n \tstruct dir_struct dir;\n@@ -138,7 +138,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)\n \t\tif (pathspec) {\n \t\t\tmemset(seen, 0, argc > 0 ? argc : 1);\n \t\t\tmatches = match_pathspec(pathspec, ent->name, len,\n-\t\t\t\t\t\t baselen, seen);\n+\t\t\t\t\t\t 0, seen);\n \t\t}\n \n \t\tif (S_ISDIR(st.st_mode)) {\n-- \n1.7.3.2.210.g045198\n"}]}