Re: Unexpected "clean -Xd" behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(+cc: Duy, Shawn)
Hi,

Pete Harlan wrote:

> When a directory contains nothing but an ignored subdirectory, that
> subdirectory does not get removed by "git clean -Xdf".
>
> For example, in a new directory:
>
> # git init
> Initialized empty Git repository in /tmp/foo/.git/
> # echo a/ >.gitignore
> # git add .gitignore
> # git commit -m "Initial commit"
> [master (root-commit) c3af24c] Initial commit
>  1 files changed, 1 insertions(+), 0 deletions(-)
>  create mode 100644 .gitignore
> # mkdir -p foo/a
> # touch foo/a/junk.o
> # git status
> # On branch master
> nothing to commit (working directory clean)
> # git clean -Xdn  # <--- DOES NOT MENTION foo/a
> # touch foo/x.c
> # git clean -Xdn  # <--- DITTO WITH UNTRACKED IN foo
> # git add foo/x.c
> # git clean -Xdn  # <--- WITH TRACKED IN foo, WILL REMOVE a/
> Would remove foo/a/
> #
>
> Is this intentional?  It's interfering with my using "git clean" to
> remove built objects, which happen to be in a dedicated temporary
> subdirectory.

Sounds like a bug.  Duy, Shawn, any hints?

Thanks,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]