pre-commit: Block partial commit of unlocked annexed file, since that left a typechange staged in index

I had hoped that the git devs could change git's handling of partial
commits to not use a false index file, but seems not.

So, this relies on some git internals to detect that case. The test suite
has a test case added to catch it if changes to git break it.

This commit was sponsored by Paul Tagliamonte.
This commit is contained in:
Joey Hess 2014-11-10 15:36:24 -04:00
parent 7e558371ab
commit adc5ca70a8
6 changed files with 59 additions and 8 deletions

8
debian/changelog vendored
View file

@ -1,3 +1,11 @@
git-annex (5.20141126) UNRELEASED; urgency=medium
* pre-commit: Block partial commit of unlocked annexed file, since
that left a typechange staged in index due to some infelicity of git's
handling of partial commits.
-- Joey Hess <joeyh@debian.org> Mon, 10 Nov 2014 15:31:55 -0400
git-annex (5.20141125) unstable; urgency=medium
* Remove fixup code for bad bare repositories created by