All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jehan Bing" <jbing@codeaurora.org>
To: <git@vger.kernel.org>
Subject: BUG: sub-git files getting cleaned when using --exclude in the top git
Date: Thu, 21 Jun 2018 18:09:48 -0700	[thread overview]
Message-ID: <006b01d409c5$b7898f80$269cae80$@codeaurora.org> (raw)

Hi,

I have a setup with tree of 250+ git repositories. Every now and then, I
want to clean everything except for files generated by my IDE. So for all
the git repos, I run “git clean -dfx --exclude <ide file>”. What happens
then is, if a sub-git as that file, all its files are deleted (except for
that ide file) instead of being skipped.

Here is a simplified setup:
       git init a
       cd a
       git init b
       touch b/1 b/2

Now, if I run (from a):
       git clean -dfx
git says “Skipping repository b/” and nothing is cleaned, as expected.

But if I run:
       git clean -dfx -e 1
then there is no “skipping” message and b/2 is deleted even if it is a file
tracked by b.
I would expect b to still be skipped and left untouched.


Regards,
  Jehan




                 reply	other threads:[~2018-06-22  1:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='006b01d409c5$b7898f80$269cae80$@codeaurora.org' \
    --to=jbing@codeaurora.org \
    --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.