# Files that want to delete themselves

4 messages from 2008-09-24 to 2008-09-24. Participants: Andrew Vit, Petr Baudis, Shawn O. Pearce.
Thread: https://gitlist.dev/t/15655

## Andrew Vit, 2008-09-24 17:55

Subject: Files that want to delete themselves
Message-ID: <19654453.post@talk.nabble.com>
URL: https://gitlist.dev/e/19654453.post%40talk.nabble.com

```

Hi,

I have a Rails project that I'm managing with git and I have a strange
problem with one of the plugin directories. Every time I do `git add .` it
tries to delete itself... Any idea what might be happening?


andrew$ git status
# On branch master
nothing to commit (working directory clean)

andrew$ git add .

andrew$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#	new file:   vendor/plugins/restful_authentication
#	deleted:    vendor/plugins/restful_authentication/CHANGELOG
#	deleted:    vendor/plugins/restful_authentication/README.textile
#	deleted:    vendor/plugins/restful_authentication/Rakefile
#	deleted:    vendor/plugins/restful_authentication/TODO
# ...
# ...
# ...
#

-- 
View this message in context: http://www.nabble.com/Files-that-want-to-delete-themselves-tp19654453p19654453.html
Sent from the git mailing list archive at Nabble.com.

```

## Petr Baudis, 2008-09-24 18:04

Subject: Re: Files that want to delete themselves
Message-ID: <20080924180436.GJ10544@machine.or.cz>
URL: https://gitlist.dev/e/20080924180436.GJ10544%40machine.or.cz
In-Reply-To: <19654453.post@talk.nabble.com>

```
  Hi,

On Wed, Sep 24, 2008 at 10:55:02AM -0700, Andrew Vit wrote:
> I have a Rails project that I'm managing with git and I have a strange
> problem with one of the plugin directories. Every time I do `git add .` it
> tries to delete itself... Any idea what might be happening?

  so how does that look like in git diff? My guess is you have a .git/
subdirectory there and thus Git assumes that it is a submodule? I don't
think we actually have a way to specify that some directory should NOT
be considered a submodule even if it is a git checkout... So you will
probably either have to actually convert this to a submodule in your
project (probably the sanest thing to do), move the .git subdirectory
away or submit a patch that will add say a .gitattributes flag not to
consider this subdirectory to be a submodule (which might make some
sense).

-- 
				Petr "Pasky" Baudis
People who take cold baths never have rheumatism,
but they have cold baths.

```

## Shawn O. Pearce, 2008-09-24 18:05

Subject: Re: Files that want to delete themselves
Message-ID: <20080924180547.GA3669@spearce.org>
URL: https://gitlist.dev/e/20080924180547.GA3669%40spearce.org
In-Reply-To: <19654453.post@talk.nabble.com>

```
Andrew Vit <andrew@avit.ca> wrote:
> 
> I have a Rails project that I'm managing with git and I have a strange
> problem with one of the plugin directories. Every time I do `git add .` it
> tries to delete itself... Any idea what might be happening?
> 
> andrew$ git status
> # On branch master
> # Changes to be committed:
> #   (use "git reset HEAD <file>..." to unstage)
> #
> #	new file:   vendor/plugins/restful_authentication
> #	deleted:    vendor/plugins/restful_authentication/CHANGELOG
> #	deleted:    vendor/plugins/restful_authentication/README.textile
> #	deleted:    vendor/plugins/restful_authentication/Rakefile
> #	deleted:    vendor/plugins/restful_authentication/TODO

Are you on a case-insensitive filesystem like HFS+?

Is it possible that restful_authentication exists as a file in
your working directory, but as a directory in Git, but with a
different case?

What does `git ls-tree HEAD:vendor/plugins` show you as the last
committed contents of vendor/plugins?

I'm a little stumped, but it sounds like the issues that have come
up before due to a case-insensitive filesystem.

-- 
Shawn.

```

## Andrew Vit, 2008-09-24 18:18

Subject: Re: Files that want to delete themselves
Message-ID: <1222280310309-1116082.post@n2.nabble.com>
URL: https://gitlist.dev/e/1222280310309-1116082.post%40n2.nabble.com
In-Reply-To: <20080924180436.GJ10544@machine.or.cz>

```


Petr Baudis wrote:
> 
>   so how does that look like in git diff? My guess is you have a .git/
> subdirectory there and thus Git assumes that it is a submodule?
> 

Yes, that did it! I was sure I deleted that .git directory in the plugin,
I'm guessing it came back when I downloaded an updated one a while ago...

Díky za dobrou radu!

--Andrew Vit

-- 
View this message in context: http://n2.nabble.com/Files-that-want-to-delete-themselves-tp1116033p1116082.html
Sent from the git mailing list archive at Nabble.com.

```
