summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-11-25 15:32:29 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-11-25 15:32:29 -0400
commitaf239e5c3312592f2d3445cc9970baa890022a5e (patch)
tree785349cb8bd630ee33436c23e9d73fb0b6ede390
parent12243d2279cae65ed163bdec1edb268817514265 (diff)
parentba1ec2c60f26bfb39ea69e4e62a09bb85e19cb4a (diff)
Merge branch 'master' of ssh://git-annex.branchable.com
-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.