git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Schubert <mschub@elegosoft.com>
To: Andrew Wong <andrew.w@sohovfx.com>
Cc: Paul Berry <stereotype441@gmail.com>, git@vger.kernel.org
Subject: Re: [BUG] git clean -X skips a directory containing only ignored files
Date: Wed, 01 Feb 2012 13:18:50 +0100	[thread overview]
Message-ID: <4F292DAA.1000107@elegosoft.com> (raw)
In-Reply-To: <4F2814D7.8030504@sohovfx.com>

On 01/31/2012 05:20 PM, Andrew Wong wrote:
> I think there were a bit of discussions on this issues just while ago too:
> http://thread.gmane.org/gmane.comp.version-control.git/188605

Thanks, missed that.

Below a patch with an update for Documentation/git-clean.txt - I'm not sure
if the issue should be described more accurate.?

-- >8 --

Subject: [PATCH] Documentation: tell about "git clean -Xd" bug

"git clean -Xd" doesn't work as expected (delete all ignored files and
untracked directories), because Git's dir subsystem is skipping
directories which both aren't explicitly ignored and don't hold any
tracked files.

Tell about this limitation in BUGS.

Signed-off-by: Michael Schubert <mschub@elegosoft.com>
---
 Documentation/git-clean.txt |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt
index 79fb984..888c07d 100644
--- a/Documentation/git-clean.txt
+++ b/Documentation/git-clean.txt
@@ -29,7 +29,8 @@ OPTIONS
 	Remove untracked directories in addition to untracked files.
 	If an untracked directory is managed by a different git
 	repository, it is not removed by default.  Use -f option twice
-	if you really want to remove such a directory.
+	if you really want to remove such a directory.  Also see BUGS
+	below.
 
 -f::
 --force::
@@ -63,6 +64,11 @@ OPTIONS
 	Remove only files ignored by git.  This may be useful to rebuild
 	everything from scratch, but keep manually created files.
 
+BUGS
+----
+'git-clean -Xd' doesn't work as expected for directories which don't hold
+any tracked files and aren't explicitly ignored either.
+
 GIT
 ---
 Part of the linkgit:git[1] suite
-- 
1.7.9.174.g356eff6

      reply	other threads:[~2012-02-01 12:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 23:36 [BUG] git clean -X skips a directory containing only ignored files Paul Berry
2012-01-31 14:47 ` Michael Schubert
2012-01-31 17:39   ` Paul Berry
2012-01-31 16:20 ` Andrew Wong
2012-02-01 12:18   ` Michael Schubert [this message]

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=4F292DAA.1000107@elegosoft.com \
    --to=mschub@elegosoft.com \
    --cc=andrew.w@sohovfx.com \
    --cc=git@vger.kernel.org \
    --cc=stereotype441@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).