git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Bohrer <shawn.bohrer@gmail.com>
To: gitster@pobox.com
Cc: madcoder@debian.org, palglowr@gmail.com, git@vger.kernel.org,
	Shawn Bohrer <shawn.bohrer@gmail.com>
Subject: [PATCH] Teach git clean to use setup_standard_excludes()
Date: Wed, 14 Nov 2007 23:00:54 -0600	[thread overview]
Message-ID: <1195102854310-git-send-email-shawn.bohrer@gmail.com> (raw)
In-Reply-To: 7vsl39l0b7.fsf@gitster.siamese.dyndns.org

Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
---
 builtin-clean.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/builtin-clean.c b/builtin-clean.c
index 01fb887..dc6a21e 100644
--- a/builtin-clean.c
+++ b/builtin-clean.c
@@ -22,7 +22,7 @@ static int git_clean_config(const char *var, const char *value)
 {
 	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)
@@ -57,7 +57,6 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 	memset(&dir, 0, sizeof(dir));
 	if (ignored_only) {
 		dir.show_ignored =1;
-		dir.exclude_per_dir = ".gitignore";
 	}
 
 	if (ignored && ignored_only)
@@ -70,11 +69,7 @@ int cmd_clean(int argc, const char **argv, const char *prefix)
 	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);
-		}
+		setup_standard_excludes(&dir);
 	}
 
 	pathspec = get_pathspec(prefix, argv);
-- 
1.5.3.GIT

                 reply	other threads:[~2007-11-15  5:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1195102854310-git-send-email-shawn.bohrer@gmail.com \
    --to=shawn.bohrer@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=madcoder@debian.org \
    --cc=palglowr@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).