git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git clean -Xdf doesn't clean ignored files in subfolders
@ 2020-11-02 22:44 David Besen
  2020-11-03 17:11 ` Elijah Newren
  0 siblings, 1 reply; 4+ messages in thread
From: David Besen @ 2020-11-02 22:44 UTC (permalink / raw)
  To: git

Hi!

I'm seeing some unexpected behavior with git clean:

git init test
cd test
echo "ignored.txt" > .gitignore
mkdir folder
touch folder/ignored.txt
git clean -Xdf

I'd expect this to delete folder/ignored.txt, and instead it doesn't.
I'm in git 2.29.2 on osx.

I saw that git clean -xdn does delete the file, so if this is a bug
it's limited to -X.

Thanks!
Dave

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git clean -Xdf doesn't clean ignored files in subfolders
  2020-11-02 22:44 git clean -Xdf doesn't clean ignored files in subfolders David Besen
@ 2020-11-03 17:11 ` Elijah Newren
  2020-11-03 18:34   ` David Besen
  0 siblings, 1 reply; 4+ messages in thread
From: Elijah Newren @ 2020-11-03 17:11 UTC (permalink / raw)
  To: David Besen; +Cc: Git Mailing List

On Mon, Nov 2, 2020 at 2:46 PM David Besen <dbesen@gmail.com> wrote:
>
> Hi!
>
> I'm seeing some unexpected behavior with git clean:
>
> git init test
> cd test
> echo "ignored.txt" > .gitignore
> mkdir folder
> touch folder/ignored.txt
> git clean -Xdf
>
> I'd expect this to delete folder/ignored.txt, and instead it doesn't.
> I'm in git 2.29.2 on osx.
>
> I saw that git clean -xdn does delete the file, so if this is a bug
> it's limited to -X.

Is this the same issue as reported at
https://lore.kernel.org/git/4F1384AE.1050209@pcharlan.com/?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git clean -Xdf doesn't clean ignored files in subfolders
  2020-11-03 17:11 ` Elijah Newren
@ 2020-11-03 18:34   ` David Besen
  2020-11-03 19:14     ` Elijah Newren
  0 siblings, 1 reply; 4+ messages in thread
From: David Besen @ 2020-11-03 18:34 UTC (permalink / raw)
  Cc: Git Mailing List

> Is this the same issue as reported at
> https://lore.kernel.org/git/4F1384AE.1050209@pcharlan.com/?

Yes, I believe so.  I am indeed using git clean as a substitute for make clean.

But, I still think a fix would be appropriate.  Ideally I could trust
git to remove all auto-generated files regardless of whether or not
the project even has a Makefile.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git clean -Xdf doesn't clean ignored files in subfolders
  2020-11-03 18:34   ` David Besen
@ 2020-11-03 19:14     ` Elijah Newren
  0 siblings, 0 replies; 4+ messages in thread
From: Elijah Newren @ 2020-11-03 19:14 UTC (permalink / raw)
  To: David Besen; +Cc: Git Mailing List

On Tue, Nov 3, 2020 at 10:36 AM David Besen <dbesen@gmail.com> wrote:
>
> > Is this the same issue as reported at
> > https://lore.kernel.org/git/4F1384AE.1050209@pcharlan.com/?
>
> Yes, I believe so.  I am indeed using git clean as a substitute for make clean.
>
> But, I still think a fix would be appropriate.  Ideally I could trust
> git to remove all auto-generated files regardless of whether or not
> the project even has a Makefile.

I'm not trying to argue against a fix, just verifying that it wasn't
recent changes that might have caused problems, and linking the
reports together in the archive with a url to help anyone interested
be able to find them.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-03 19:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-02 22:44 git clean -Xdf doesn't clean ignored files in subfolders David Besen
2020-11-03 17:11 ` Elijah Newren
2020-11-03 18:34   ` David Besen
2020-11-03 19:14     ` Elijah Newren

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).