From: Joachim B Haga <jobh@broadpark.no>
To: git@vger.kernel.org
Subject: git clean removes directories when not asked to
Date: Tue, 08 Apr 2008 20:22:56 +0200 [thread overview]
Message-ID: <85prt0jjen.fsf@lupus.strangled.net> (raw)
This is with debian packaged 1.5.4.4.
When invoked from a subdirectory, git clean removes more than it
should. According to the documentation, it should not remove
directories unless "-d" is given. However:
pep ~/src/test 0$ git init
Initialized empty Git repository in .git/
pep ~/src/test|master 0$ mkdir dir
pep ~/src/test|master 0$ mkdir dir/subdir
pep ~/src/test|master 0$ git clean -f
Not removing dir/
pep ~/src/test|master 0$ cd dir
pep ~/src/test/dir|master 0$ git clean -f
Removing subdir/
pep ~/src/test/dir|master 0$ ls subdir
ls: cannot access subdir: No such file or directory
Luckily I just lost some compilation results in this case, but this is
unexpected and dangerous behaviour.
(Additionally, I find the "-f" slightly annoying but that's not an issue here.)
-j
next reply other threads:[~2008-04-08 18:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-08 18:22 Joachim B Haga [this message]
2008-04-08 18:38 ` git clean removes directories when not asked to Joachim B Haga
2008-04-09 17:04 ` [PATCH] " Joachim B Haga
2008-04-13 23:49 ` [PATCH] git clean: Don't automatically remove directories when run within subdirectory Shawn Bohrer
2008-04-13 23:49 ` [PATCH] git clean: Add test to verify directories aren't removed with a prefix Shawn Bohrer
2008-04-14 7:03 ` [PATCH] git clean: Don't automatically remove directories when run within subdirectory Joachim Berdal Haga
2008-04-14 7:18 ` Junio C Hamano
2008-04-14 17:06 ` Shawn Bohrer
2008-04-14 18:18 ` Joachim Berdal Haga
2008-04-15 3:44 ` Shawn Bohrer
2008-04-15 6:33 ` Joachim Berdal Haga
2008-04-15 14:26 ` Shawn Bohrer
2008-04-15 14:46 ` Joachim Berdal Haga
2008-04-15 3:14 ` Shawn Bohrer
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=85prt0jjen.fsf@lupus.strangled.net \
--to=jobh@broadpark.no \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.