git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "jones.noamle" <lenoam@gmail.com>
To: git@vger.kernel.org
Subject: BUG - git clean
Date: Fri, 11 Oct 2013 14:53:08 -0400	[thread overview]
Message-ID: <52584914.6030103@gmail.com> (raw)

Passing to git clean wrong (non-existent) paths together with valid 
ones, causes it to delete stuff that it shouldn't.
Am I right?
Script to reproduce:

mkdir test
cd test
git init .
mkdir ba
mkdir ba/ca

# So far so good.
# Should clean directory "ba/ca"
git clean -dn -- ba/ca

# Should clean "ba/ca" and ignore non-existent "j"
# Instead, it wants to delete "ba" totally.
git clean -dn -- ba/ca j

git --version

---------------------------------------------------------------------
Output:

+ mkdir test
+ cd test
+ git init .
Initialized empty Git repository in /home/notroot/test/.git/
+ mkdir ba
+ mkdir ba/ca
+ git clean -dn -- ba/ca
Would remove ba/ca/
+ git clean -dn -- ba/ca j
Would remove ba/
+ git --version
git version 1.7.9.5

---------------------------------------------------------------------

Thanks!
Noam

             reply	other threads:[~2013-10-11 18:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11 18:53 jones.noamle [this message]
2013-10-12 10:36 ` BUG - git clean Di Xu

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=52584914.6030103@gmail.com \
    --to=lenoam@gmail.com \
    --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 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).