smudge: Warn when encountering a pointer file that has other content appended to it

It will then proceed to add the file the same as if it were any other
file containing possibly annexable content. Usually the file is one that
was annexed before, so the new, probably corrupt content will also be added
to the annex. If the file was not annexed before, the content will be added
to git.

It's not possible for the smudge filter to throw an error here, because
git then just adds the file to git anyway.

Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
Joey Hess 2022-02-23 15:17:08 -04:00
parent 67245ae00f
commit 64ccb4734e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 55 additions and 23 deletions

View file

@ -72,3 +72,5 @@ may be situation is even more "dire" because git-annex still considers this file
[[!meta author=yoh]]
[[!tag projects/datalad]]
> [[fixed|done]] (at least as far as it can be fixed) --[[Joey]]

View file

@ -0,0 +1,10 @@
[[!comment format=mdwn
username="joey"
subject="""comment 5"""
date="2022-02-23T19:13:25Z"
content="""
joey@darkstar:/tmp/r>git add xx
git-annex: The file "xx" looks like git-annex pointer file that has had other content appended to it
I think this is as far as git-annex can do toward preventing foot shooting here.
"""]]