Merge branch 'master' of ssh://git-annex.branchable.com

This commit is contained in:
Joey Hess 2014-10-09 17:03:44 -04:00
commit 7dd65d1bc3
4 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,12 @@
[[!comment format=mdwn
username="http://joeyh.name/"
ip="209.250.56.54"
subject="behaving as intended"
date="2014-10-09T20:30:26Z"
content="""
git-annex add is supposed to add unlocked files. See the documentation for the unlock command on the man page. Typical workflow is to unlock a file, edit it, add the changes, and commit it.
Your example has 2 files with content \"foo\" and 1 file with content \"foobar\", which require 2 objects to be stored by git-annex, so that's what it stores.
I suggest you get a bit more familiar with git-annex before filing bugs on it.
"""]]

View file

@ -0,0 +1,13 @@
[[!comment format=mdwn
username="http://joeyh.name/"
ip="209.250.56.54"
subject="comment 4"
date="2014-10-09T20:43:34Z"
content="""
Ah, ok. git's index has the file listed as not being a symlink, because `git commit $file` stages it in the index that way. Running `git reset --hard` will fix git's index.
This problem is avoided if you `git annex add $file` before committing. Which is generally a good idea
for other reasons, including avoiding staging a potentially huge file's contents in the git index in the first place.
git-annex's pre-commit hook should probably update the git index for the committed files, replacing the staged full file contents with the git-annex symlink. That would avoid this problem.
"""]]