From: Jonathan Nieder <jrnieder@gmail.com>
To: Pete Harlan <pgit@pcharlan.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Shawn Bohrer" <shawn.bohrer@gmail.com>
Subject: Re: Unexpected "clean -Xd" behavior
Date: Wed, 18 Jan 2012 18:29:04 -0600 [thread overview]
Message-ID: <20120119002904.GA14107@burratino> (raw)
In-Reply-To: <4F1384AE.1050209@pcharlan.com>
(+cc: Duy, Shawn)
Hi,
Pete Harlan wrote:
> When a directory contains nothing but an ignored subdirectory, that
> subdirectory does not get removed by "git clean -Xdf".
>
> For example, in a new directory:
>
> # git init
> Initialized empty Git repository in /tmp/foo/.git/
> # echo a/ >.gitignore
> # git add .gitignore
> # git commit -m "Initial commit"
> [master (root-commit) c3af24c] Initial commit
> 1 files changed, 1 insertions(+), 0 deletions(-)
> create mode 100644 .gitignore
> # mkdir -p foo/a
> # touch foo/a/junk.o
> # git status
> # On branch master
> nothing to commit (working directory clean)
> # git clean -Xdn # <--- DOES NOT MENTION foo/a
> # touch foo/x.c
> # git clean -Xdn # <--- DITTO WITH UNTRACKED IN foo
> # git add foo/x.c
> # git clean -Xdn # <--- WITH TRACKED IN foo, WILL REMOVE a/
> Would remove foo/a/
> #
>
> Is this intentional? It's interfering with my using "git clean" to
> remove built objects, which happen to be in a dedicated temporary
> subdirectory.
Sounds like a bug. Duy, Shawn, any hints?
Thanks,
Jonathan
next prev parent reply other threads:[~2012-01-19 0:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-16 2:00 Unexpected "clean -Xd" behavior Pete Harlan
2012-01-19 0:29 ` Jonathan Nieder [this message]
2012-01-19 7:31 ` Nguyen Thai Ngoc Duy
2012-01-19 10:03 ` Jonathan Nieder
2012-01-19 22:12 ` pgit
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=20120119002904.GA14107@burratino \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=pclouds@gmail.com \
--cc=pgit@pcharlan.com \
--cc=shawn.bohrer@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).