summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 625db1b)
raw | patch | inline | side by side (parent: 625db1b)
author | Shawn Bohrer <shawn.bohrer@gmail.com> | |
Thu, 15 Nov 2007 05:00:54 +0000 (23:00 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 19 Nov 2007 03:11:42 +0000 (19:11 -0800) |
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-clean.c | patch | blob | history |
diff --git a/builtin-clean.c b/builtin-clean.c
index 8da6f3c633dca7fbb5a0c06bc0ae2c2f71b6cc3f..56ae4eb9bb4efad179f7d664880457535bd6048f 100644 (file)
--- a/builtin-clean.c
+++ b/builtin-clean.c
{
if (!strcmp(var, "clean.requireforce"))
force = !git_config_bool(var, value);
- return 0;
+ return git_default_config(var, value);
}
int cmd_clean(int argc, const char **argv, const char *prefix)
argc = parse_options(argc, argv, options, builtin_clean_usage, 0);
memset(&dir, 0, sizeof(dir));
- if (ignored_only) {
- dir.show_ignored =1;
- dir.exclude_per_dir = ".gitignore";
- }
+ if (ignored_only)
+ dir.show_ignored = 1;
if (ignored && ignored_only)
die("-x and -X cannot be used together");
dir.show_other_directories = 1;
- if (!ignored) {
- dir.exclude_per_dir = ".gitignore";
- if (!access(git_path("info/exclude"), F_OK)) {
- char *exclude_path = git_path("info/exclude");
- add_excludes_from_file(&dir, exclude_path);
- }
- }
+ if (!ignored)
+ setup_standard_excludes(&dir);
pathspec = get_pathspec(prefix, argv);
read_cache();