summaryrefslogtreecommitdiff
path: root/doc/bugs/dropunused_doesn__39__t_handle_double_spaces_in_filename.mdwn
diff options
context:
space:
mode:
authorGravatar https://www.google.com/accounts/o8/id?id=AItOawnBJ6Dv1glxzzi4qIzGFNa6F-mfHIvv9Ck <Jim@web>2011-11-25 05:56:59 +0000
committerGravatar admin <admin@branchable.com>2011-11-25 05:56:59 +0000
commitba1ec2c60f26bfb39ea69e4e62a09bb85e19cb4a (patch)
treef8ba12d7962ff0ffd06005fe13dbf4390ae51bc1 /doc/bugs/dropunused_doesn__39__t_handle_double_spaces_in_filename.mdwn
parent709acf3f240171fa1e3782c8e0362ff4f3239bfb (diff)
Diffstat (limited to 'doc/bugs/dropunused_doesn__39__t_handle_double_spaces_in_filename.mdwn')
-rw-r--r--doc/bugs/dropunused_doesn__39__t_handle_double_spaces_in_filename.mdwn83
1 files changed, 83 insertions, 0 deletions
diff --git a/doc/bugs/dropunused_doesn__39__t_handle_double_spaces_in_filename.mdwn b/doc/bugs/dropunused_doesn__39__t_handle_double_spaces_in_filename.mdwn
new file mode 100644
index 000000000..930e23ea9
--- /dev/null
+++ b/doc/bugs/dropunused_doesn__39__t_handle_double_spaces_in_filename.mdwn
@@ -0,0 +1,83 @@
+Unused files with double spaces in their name are not removed by `dropunused`:
+
+Script:
+
+ #!/bin/bash
+
+ BASE=/tmp/unused-bug
+
+ # setup
+ set -x
+ chmod -R +w $BASE
+ rm -rf $BASE
+ mkdir -p $BASE
+ cd $BASE
+
+ # create annex
+ git init .
+ git annex init
+
+ # make a file with two spaces
+ echo hello > 'foo bar'
+
+ # add it
+ git annex add --backend WORM 'foo bar'
+ git commit -m 'add'
+
+ # remove it
+ git rm 'foo bar'
+ git commit -m 'remove'
+
+ # unused
+ git annex unused
+ git annex dropunused 1
+ git annex unused
+
+Output:
+
+ + chmod -R +w /tmp/unused-bug
+ + rm -rf /tmp/unused-bug
+ + mkdir -p /tmp/unused-bug
+ + cd /tmp/unused-bug
+ + git init .
+ Initialized empty Git repository in /tmp/unused-bug/.git/
+ + git annex init
+ init ok
+ + echo hello
+ + git annex add --backend WORM 'foo bar'
+ add foo bar ok
+ (Recording state in git...)
+ + git commit -m add
+ [master (root-commit) 926f7f5] add
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ create mode 120000 foo bar
+ + git rm 'foo bar'
+ rm 'foo bar'
+ + git commit -m remove
+ [master d025e3f] remove
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+ delete mode 120000 foo bar
+ + git annex unused
+ unused . (checking for unused data...) (checking master...)
+ Some annexed data is no longer used by any files:
+ NUMBER KEY
+ 1 WORM-s6-m1322200438--foo bar
+ (To see where data was previously used, try: git log --stat -S'KEY')
+
+ To remove unwanted data: git-annex dropunused NUMBER
+
+ ok
+ + git annex dropunused 1
+ dropunused 1 ok
+ + git annex unused
+ unused . (checking for unused data...) (checking master...)
+ Some annexed data is no longer used by any files:
+ NUMBER KEY
+ 1 WORM-s6-m1322200438--foo bar
+ (To see where data was previously used, try: git log --stat -S'KEY')
+
+ To remove unwanted data: git-annex dropunused NUMBER
+
+ ok
+
+Strange that `dropunused` still said "ok" when it didn't succeed at removing the file.