git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "shunichi fuji" <palglowr@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] git-clean: consider core.excludesfile
Date: Wed, 14 Nov 2007 16:40:33 +0900	[thread overview]
Message-ID: <30046e3b0711132340y2c503dd4laea24b9b1c79a160@mail.gmail.com> (raw)

git-clean used "git ls-files" and "git ls-files" don't consider
core.excludesfile.
i add few lines.

--- /usr/bin/git-clean  2007-11-14 08:26:20.000000000 +0900
+++ git-clean   2007-11-14 09:43:03.000000000 +0900
@@ -81,9 +81,14 @@
       if [ "$ignoredonly" ]; then
               excl="$excl --ignored"
       fi
+       core_excl="`git-config core.excludesfile`"
+       if [ -f "$core_excl" ]; then
+               core_excl_info="--exclude-from=$core_excl"
+       fi
 fi

-git ls-files --others --directory $excl ${excl_info:+"$excl_info"} -- "$@" |
+git ls-files --others --directory $excl ${excl_info:+"$excl_info"} \
+${core_excl_info:+"$core_excl_info"} -- "$@" |
 while read -r file; do
       if [ -d "$file" -a ! -L "$file" ]; then
               if [ -z "$cleandir" ]; then

             reply	other threads:[~2007-11-14  7:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-14  7:40 shunichi fuji [this message]
2007-11-14  8:58 ` [PATCH] git-clean: consider core.excludesfile Junio C Hamano
2007-11-14  9:44 ` Jakub Narebski
2007-11-14  9:54 ` [PATCH] git-clean: honor core.excludesfile Junio C Hamano
2007-11-14 10:02 ` [PATCH] git-clean: consider core.excludesfile Johannes Sixt

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=30046e3b0711132340y2c503dd4laea24b9b1c79a160@mail.gmail.com \
    --to=palglowr@gmail.com \
    --cc=git@vger.kernel.org \
    /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).