git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git clean --exclude broken?
@ 2011-08-24 19:15 Todd Rinaldo
  2011-08-24 21:23 ` Junio C Hamano
  0 siblings, 1 reply; 15+ messages in thread
From: Todd Rinaldo @ 2011-08-24 19:15 UTC (permalink / raw)
  To: git

I think I have found a new bug in 1.7.5:
# Setup:
mkdir tmp && cd tmp
git init
mkdir foo && touch foo/bar
mkdir bar && touch bar/baz
echo "/foo" > .gitignore
echo "/bar" >> .gitignore
git add .gitignore
git commit -m ignore

# The problem (Why is foo/ removed?)
$>git clean -dXf --exclude=/foo
Removing bar/
Removing foo/

I apologize if this isn't the correct channel to report a bug. Does anyone know if this is a known issue?

Thanks,
Todd Rinaldo

^ permalink raw reply	[flat|nested] 15+ messages in thread
* git clean --exclude broken?
@ 2024-11-24 11:10 Homyee King
  2024-11-24 18:12 ` brian m. carlson
  0 siblings, 1 reply; 15+ messages in thread
From: Homyee King @ 2024-11-24 11:10 UTC (permalink / raw)
  To: git

13 years ago, Todd Rinaldo found that —exclude option is not works with any options, for example, `git clean -Xd -e=foo` to clean the files/folders respect the .gitignore rule except the foo, but in real world, git only respect the git ignore standard rule and not work with -e option.

Today, 13 years later, the problem still exist, so I wonder is this a bug or should we clarify the “correct” usage of exclude in documentation, because it’s really confusing.

The discussion can be viewed by this link: https://git.vger.kernel.narkive.com/ulppacPK/clean-exclude-broken

Looking forward to your reaply!

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

end of thread, other threads:[~2024-12-10  2:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-24 19:15 git clean --exclude broken? Todd Rinaldo
2011-08-24 21:23 ` Junio C Hamano
2011-08-24 23:08   ` Todd Rinaldo
2011-08-25  1:38   ` Junio C Hamano
2011-08-25 18:29     ` Re* " Junio C Hamano
2011-08-25 18:38       ` Michael Schubert
2011-08-25 20:28         ` Junio C Hamano
2011-08-26 10:00       ` Thomas Rast
2011-08-27 23:54       ` Pete Wyckoff
2011-08-28  6:27         ` Junio C Hamano
2011-08-28 12:31           ` Pete Wyckoff
  -- strict thread matches above, loose matches on Subject: below --
2024-11-24 11:10 Homyee King
2024-11-24 18:12 ` brian m. carlson
     [not found]   ` <CABAKogYaajvedff2ihsC5g+156L-Oe2N_XR3c+uyyfoovVQ5gg@mail.gmail.com>
2024-11-28 20:58     ` brian m. carlson
     [not found]       ` <CABAKogZQ4bAh-KPE79q0W7iBBoRmxW26RK_6VSg=6Y-Sg68tig@mail.gmail.com>
2024-12-10  2:23         ` brian m. carlson

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).