Files that want to delete themselves
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 # ... # ... # ... #
Signature · 2 lines
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.
Hi,
Quoted 3 lines · Andrew Vit
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).
Signature · 3 lines
Petr "Pasky" Baudis People who take cold baths never have rheumatism, but they have cold baths.
Quoted 4 lines · Petr Baudis
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
Signature · 2 lines
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.
Quoted 10 lines · Andrew Vit
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)
#
Quoted 5 lines
# 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.
Signature · 1 line
Shawn.