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

View file

@ -38,3 +38,6 @@ git version 1.7.9.5
[[!tag confirmed]]
[[!meta title="git commit of unlocked file leaves typechange staged in index"]]
> [[fixed|done]]; git-annex pre-commit will block such commits from being
> made. Git devs didn't seem to have a way to improve its behavior. --[[Joey]]