]> dgit.raspbian.org Git - git-annex.git/blob
3db37eee6b77a5d11e4253c241ca871b36484e57
[git-annex.git] /
1 [[!comment format=mdwn
2  username="joey"
3  subject="""comment 6"""
4  date="2018-09-05T18:26:33Z"
5  content="""
6 Reproduced.
7
8 Analysis: In v6, `git annex add` runs `git ls-files --modified`, 
9 which runs the clean filter on the unlocked file as git sees it was
10 modified. Which in ingests the file with lockingFile = False.
11 So, the annex object doesn't get the write bit cleared at that point.
12 Then when `git annex add` gets around to ingesting the file
13 itself, since the annex object is already present it's used as-is.
14
15 `git add` of a new file in v6 also puts content in the annex
16 with the write bit set. If a different file with that same content is then passed
17 to `git annex add`, the same thing happens with the symlink to unprotected
18 content.
19
20 So, linkToAnnex should freezeContent. That would solve all cases that lead
21 to this. (But not when annex.thin has made the annex object a hard link,
22 in that case it being writable is expected.)
23 """]]