Please describe the problem.
(git-annex)hopa:/tmp/1038_hyperface[master]git-annex
$> git annex view 'needed-by=*'
view (searching...) fatal: Unable to add (null) to database
fatal: Unable to add (null) to database
fatal: Unable to add (null) to database
fatal: Unable to add (null) to database
fatal: Unable to add (null) to database
fatal: Unable to add (null) to database
fatal: Unable to add (null) to database
fatal: Unable to add (null) to database
fatal: Unable to add (null) to database
fatal: Unable to add (null) to database
fatal: Unable to add (null) to database
git-annex: fd:14: hGetLine: end of file
failed
git-annex: user error (git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","hash-object","-w","--stdin-paths","--no-filters"] exited 128)
$> git annex version
git-annex version: 6.20180416+gitg86b18966f-1~ndall+1
copy of the repository will be provided via email
I have not received the database by email yet.
Note that this is a sqlite error message.
I wonder if this is a symptom of the same bug as http://git-annex.branchable.com/bugs/regression_-_fails_to_drop_._Exit_code_11_wo_--debug__44___and_1_with_--debug/ since it popped up at the same time, and that also involved a NULL dereference.
I have the file. I've reproduced the crash using that repo and the most recent git-annex.
I don't think sqlite is involved after all; seems that git hash-object is what's crashing on a null pointer.
It's caused by git submodules with names starting with dots. Not at all related to the recent null pointer dereference bug in git-annex.
The .heudiconv/ directory is a submodule and git ls-files lists it; the view generation code assumes it's a dotfile and asks git to hash it.
Views only include dotfiles to make .gitattributes etc work, and they don't include submodules normally, but they do include dot-dirs too; indeed I see this repository uses that with a .datalad/ that gets included in the view. Perhaps .heudiconv/ is a similar dot-dir. Seems that such submodule dot-dirs ought to be included in the view.