summaryrefslogtreecommitdiff
path: root/doc/bugs/non-annexed_file_changed_to_annexed_on_typechange/comment_5_5e74431048b07631e0dbeca90fdb365b._comment
blob: b2f525648e58dcdda4ea02fbdd4dcd7190f61972 (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
[[!comment format=mdwn
 username="arand"
 ip="130.243.226.21"
 subject="comment 5"
 date="2013-08-12T21:50:47Z"
 content="""
Hmm, I think I see it now, you were missing a `rm` command in the log, and I had no idea the pre-commit hook existed :)

This reproduces the issue, and it seems to indeed be a bug in the git-annex pre-commit handling, nice catch.

<pre>
$ git init temp
Initialized empty Git repository in /home/arand/tmp/temp/.git/
$ cd temp && git annex init
init  ok
(Recording state in git...)
$ ln -s broken link
$ git add .
$ git commit -m\"add broken link\"
[master (root-commit) 8125488] add broken link
 1 file changed, 1 insertion(+)
 create mode 120000 link
$ rm link
$ echo \"actual file\" >link
$ git add .
$ git commit -m\"replace link with real file\"
add link (checksum...) ok
ok
(Recording state in git...)
[master b58b068] replace link with real file
 1 file changed, 1 insertion(+), 1 deletion(-)
$ git diff HEAD~ | cat
diff --git a/link b/link
index 86a410d..4104f6e 120000
--- a/link
+++ b/link
@@ -1 +1 @@
-broken
\ No newline at end of file
+.git/annex/objects/v4/GQ/SHA256E-s12--ef29ded6f5ae80d89a838d37e01ed3efaade7a2994aff87d1100697554b7327b/SHA256E-s12--ef29ded6f5ae80d89a838d37e01ed3efaade7a2994aff87d1100697554b7327b
\ No newline at end of file
$
</pre>



"""]]