summaryrefslogtreecommitdiff
path: root/doc/bugs/set_metadata_on_wrong_files.mdwn
blob: e317147840ac30ef97408a4993a6579c58440415 (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
88
89
90
### Please describe the problem.

For an example I wanted to add different metadata to some test files,
but the outcome is that the last metadata gets applied to all three files. see transcript below.



### What steps will reproduce the problem?

1. Create a git annex repository
2. add a few files
3. add some metadata to the files, same keys, differnt values
4. watch the metadata, only the last added one is shown for all files


### What version of git-annex are you using? On what operating system?
    $cat /etc/debian_version; uname -a; git annex version
    7.4
    Linux jupiter 3.13.0ct #33 SMP PREEMPT Tue Jan 21 05:04:01 CET 2014 x86_64 GNU/Linux
    git-annex version: 5.20140306~bpo70+1
    build flags: Assistant Webapp Pairing S3 Inotify DBus XMPP Feeds Quvi TDFA
    key/value backends: SHA256E SHA1E SHA512E SHA224E SHA384E SHA256 SHA1 SHA512 SHA224 SHA384 WORM URL
    remote types: git gcrypt S3 bup directory rsync web tahoe glacier hook external
    local repository version: 5
    supported repository version: 5
    upgrade supported from repository versions: 0 1 2 4


### Please provide any additional information below.

Debian/Wheezy with git annex from backports. The test was done in /tmp which is a tmpfs.


[[!format sh """
$export LC_ALL=C
$mkdir /tmp/annextest
$cd /tmp/annextest
$git init
Initialized empty Git repository in /tmp/annextest/.git/
$git annex init
init  ok
(Recording state in git...)

$touch a.txt b.txt c.txt
$git annex add a.txt b.txt c.txt
add a.txt ok
add b.txt ok
add c.txt ok
(Recording state in git...)
$git commit -m init
[master (root-commit) 5470bdb] init
 3 files changed, 3 insertions(+)
 create mode 120000 a.txt
 create mode 120000 b.txt
 create mode 120000 c.txt

$git annex metadata a.txt -s foo=bar -s num=1
metadata a.txt 
  foo=bar
  num=1
ok
(Recording state in git...)
$git annex metadata b.txt -s foo=baz -s num=2
metadata b.txt 
  foo=baz
  num=2
ok
(Recording state in git...)
$git annex metadata c.txt -s foo=barf -s num=3
metadata c.txt 
  foo=barf
  num=3
ok
(Recording state in git...)
$git annex metadata
metadata a.txt 
  foo=barf
  num=3
ok
metadata b.txt 
  foo=barf
  num=3
ok
metadata c.txt 
  foo=barf
  num=3
ok
"""]]

> [[fixed|done]]; documentation improved --[[Joey]]