How to remove a directory with git-annex added?

This commit is contained in:
https://www.google.com/accounts/o8/id?id=AItOawkBTVYS5lTecuenAB01eHgfUxE20vWVpU4 2014-08-05 18:07:56 +00:00 committed by admin
parent d0779c815a
commit beecf61fe0

View file

@ -1,20 +1,23 @@
/tmp$ mkdir -p /tmp/music The following commands and the output show that a directory associated with git-annex can not be deleted. Does anybody know why it can not be deleted? Is there anything wrong?
/tmp$ cd /tmp/music
/tmp/music$ git init
Initialized empty Git repository in /private/tmp/music/.git/ /tmp$ mkdir -p /tmp/music
/tmp/music$ git annex init 'Music on keller' /tmp$ cd /tmp/music
init Music on keller ok /tmp/music$ git init
(Recording state in git...) Initialized empty Git repository in /private/tmp/music/.git/
/tmp/music$ echo Hello > hello.txt /tmp/music$ git annex init 'Music on keller'
/tmp/music$ git annex add --backend=SHA1 . init Music on keller ok
add hello.txt ok (Recording state in git...)
(Recording state in git...) /tmp/music$ echo Hello > hello.txt
/tmp/music$ git commit -a -m "Imported my music collection" /tmp/music$ git annex add --backend=SHA1 .
[master (root-commit) 433f42b] Imported my music collection add hello.txt ok
1 file changed, 1 insertion(+) (Recording state in git...)
create mode 120000 hello.txt /tmp/music$ git commit -a -m "Imported my music collection"
/tmp/music$ cd .. [master (root-commit) 433f42b] Imported my music collection
/tmp$ rm -rf music/ 1 file changed, 1 insertion(+)
rm: cannot remove music/.git/annex/objects/w8/X0/SHA1-s6--1d229271928d3f9e2bb0375bd6ce5db6c6d348d9/SHA1-s6--1d229271928d3f9e2bb0375bd6ce5db6c6d348d9: Permission denied create mode 120000 hello.txt
/tmp$ sudo rm -rf music/ /tmp/music$ cd ..
/tmp$ /tmp$ rm -rf music/
rm: cannot remove music/.git/annex/objects/w8/X0/SHA1-s6--1d229271928d3f9e2bb0375bd6ce5db6c6d348d9/SHA1-s6--1d229271928d3f9e2bb0375bd6ce5db6c6d348d9: Permission denied
/tmp$ sudo rm -rf music/
/tmp$