1 ### Please describe the problem.
3 Leads to a failure of 'git commit' upon attempt to commit a file which went from "largefile" to small, according to .gitattributes settings, if we `git annex add file` before committing the change.
5 ### What version of git-annex are you using? On what operating system?
7 6.20180720+gitg03978571f-1~ndall+1
9 ### Please provide any additional information below.
11 Here is a full script to reproduce it:
19 if [ -e /tmp/repo ]; then
20 chmod -R +w /tmp/repo;
27 echo '* annex.largefiles=(largerthan=5b)' >.gitattributes;
28 git add .gitattributes;
29 git commit -m 'added .gitattri';
35 git annex unlock file;
39 # this would work but commit to git-annex, not git despite .gitattributes settings
40 # git commit -m edit -a
41 # This one would fail to commit at all, complaining about "partial commit"
42 git commit -m edit file
54 add file (non-large file; adding content to git repository) ok
55 add file (non-large file; adding content to git repository) ok
56 (recording state in git...)
57 + git commit -m edit file
58 git-annex: Cannot make a partial commit with unlocked annexed files. You should `git annex add` the files you want to commit, and then run git commit.
61 additional observations:
63 - works fine if remains large file (e.g. we just append to it)
64 - does not fail if we do `git commit -a` not `git commit file`, but it commits it to annex not to git, despite previous `git annex add` message rightfully says that "non-large file; adding content to git repository"
67 - have consistent behavior between `commit -a` and `commit file`
68 - commit without a failure, committing to git (since .gitattributes instructs so and even `git annex add` reports that)
71 [[!tag projects/datalad]]
73 > [[fixed|done]] --[[Joey]]