blob: a6b44cd2a3b666a0b485eb326da49d7bd5577c06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
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.
> It was misparsing the unused file, so it thought you'd asked it to drop a
> key that didn't exist (which means already dropped) so no error. I've
> fixed the bug. [[done]] --[[Joey]]
|