back out incorrect IO interleaving change

Fix regression in last release that crashes when using --all or running
git-annex in a bare repository. May have also affected git-annex unused and
git-annex info.

Reversed the order of the (++) in Annex.Branch.files so --all will stream
lazily still when there are not a bunch of uncommitted journal files.
Added a todo to maybe improve this later.

This commit was sponsored by Trenton Cronholm on Patreon.
This commit is contained in:
Joey Hess 2018-05-08 13:54:42 -04:00
parent 348c6d56f9
commit d1961e4498
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 65 additions and 15 deletions

View file

@ -101,3 +101,5 @@ error: git-annex died of signal 11
which also resolves with downgrade of git-annex.
[[!meta author=yoh]]
> [[fixed|done]] --[[Joey]]

View file

@ -0,0 +1,24 @@
[[!comment format=mdwn
username="joey"
subject="""comment 1"""
date="2018-05-08T17:09:35Z"
content="""
Neither git rev 6316072f0 nor 86b18966f is present in my git-annex git repo,
which makes it kind of hard to look at the diff between whatever versions
of git-annex you're running. Are you building out of a patched git
repository?
My guess is [[!commit bea0ad220a68138dc0a43d0c86bb2353ecf92d2c]]
since it involves both directory reading and unsafeInterleaveIO.
Indeed, it looks like that could defer a readDirStream due to
unsafeInterleaveIO to outside the open/close bracket. And I suppose reading
from a closed file handle might conceivably segfault.
Looks like that would affect bare repositories, or using --all.
I don't think it would affect those commands in a non-bare repository.
Ah, I see youre whereis is indeed in a bare repository, and your drop
used --all, so my analysis seems right.
Fixed by backing out the problematic part of the commit.
"""]]