git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jean-Philippe Gariépy" <jean-philippe.gariepy@nuecho.com>
To: git@vger.kernel.org
Subject: git clean -X behaviour when .gitignore has sub-directory entries
Date: Fri, 16 Jul 2010 15:05:45 -0400	[thread overview]
Message-ID: <4C40AD89.1070005@nuecho.com> (raw)

Hi,

When using sub-directory entries in .gitignore, "git clean -X" doesn't 
clean the ignored sub-directory.

$ git init test
Initialized empty Git repository in /home/jpgariep/git/test/.git/
$ cd test/
$ mkdir -p a/b/c
$ touch a/b/c/test
$ echo '/a/b/' > .gitignore
$ git add .gitignore
$ git commit -m "Added .gitignore."
[master (root-commit) 94e2825] Added .gitignore.
  1 files changed, 1 insertions(+), 0 deletions(-)
  create mode 100644 .gitignore
$ git status
# On branch master
nothing to commit (working directory clean)
$ git clean -X -d -f
$ ls a
b

Why is b still there?


Thanks.

-- 
Jean-Philippe Gariépy

                 reply	other threads:[~2010-07-16 19:13 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=4C40AD89.1070005@nuecho.com \
    --to=jean-philippe.gariepy@nuecho.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).