git-annex/Annex
Joey Hess d9d76cf98b Fix minor FD leak in journal code.
Minor because normally only 1 FD is leaked per git-annex run. However,
the test suite leaks a few hundred FDs, and this broke it on the Debian
autobuilders, which seem to have a tigher than usual ulimit.

The leak was introduced by the lazy getDirectoryContents' that was
introduced in e6330988dd in order to scale to
millions of journal files -- if the lazy list was never fully consumed, the
directory handle did not get closed.

Instead, pull in openDirectory/readDirectory/closeDirectory code that I
already developed and submitted in a patch to the haskell directory library
earlier. Using this in journalDirty avoids the place that the lazy list
caused a problem. And using it in stageJournal eliminates the need for
getDirectoryContents'.

The getJournalFiles* functions are switched back to using the regular
strict getDirectoryContents. I'm not sure if those always consume the whole
list, so this avoids any leak. And the things that call those are things
like git annex unused, which also look at every file committed to the
git-annex branch, so would need more work to scale to insane numbers of
files anyway.
2014-07-09 23:36:53 -04:00
..
Branch forget --drop-dead: Avoid removing the dead remote from the trust.log, so that if git remotes for it still exist anywhere, git annex info will still know it's dead and not show it. 2014-03-26 13:28:26 -04:00
Content finish fixing windows timezone madness 2014-06-12 13:54:08 -04:00
Direct fix reversion in relative paths to local remotes of direct mode repos 2013-11-26 19:33:26 -04:00
MetaData toplevel lastchanged field 2014-03-19 19:10:55 -04:00
View fix test to work on Windows 2014-02-25 18:09:45 -04:00
AutoMerge.hs fix build warning 2014-07-09 15:39:19 -04:00
Branch.hs Fix minor FD leak in journal code. 2014-07-09 23:36:53 -04:00
BranchState.hs remove git-annex branch read cache 2012-10-19 14:25:15 -04:00
CatFile.hs Fix bug in automatic merge conflict resolution 2014-07-08 13:55:11 -04:00
CheckAttr.hs finished where indentation changes 2012-12-13 00:24:19 -04:00
CheckIgnore.hs hlint 2013-09-25 03:09:06 -04:00
Content.hs import metadata from feeds 2014-07-03 14:15:00 -04:00
Direct.hs fix windows build 2014-07-09 15:37:25 -04:00
Drop.hs remove some monkey faces 2014-02-01 17:14:38 -04:00
Environment.hs When init detects that git is not configured to commit, and sets user.email to work around the problem, also make it set user.name. 2014-04-20 14:17:57 -04:00
Exception.hs Use exceptions in place of deprecated MonadCatchIO-transformers 2014-05-28 17:03:40 -04:00
FileMatcher.hs reorg matcher types; no non-type code changes 2014-03-29 14:43:34 -04:00
Hook.hs fix handling of nonexistant hook 2014-03-03 13:59:36 -04:00
Index.hs sync, assistant, remotedaemon: Use ssh connection caching for git pushes and pulls. 2014-04-12 15:59:34 -04:00
Init.hs reinit: New command that can initialize a new reposotory using the configuration of a previously known repository. Useful if a repository got deleted and you want to clone it back the way it was. 2014-04-15 20:13:35 -04:00
Journal.hs Fix minor FD leak in journal code. 2014-07-09 23:36:53 -04:00
Link.hs Fix bug in automatic merge conflict resolution 2014-07-08 13:55:11 -04:00
LockPool.hs use locking on Windows 2014-01-28 14:42:03 -04:00
MakeRepo.hs support commit.gpgsign 2014-07-04 11:53:51 -04:00
MetaData.hs really add non-date metadata too 2014-07-03 14:35:20 -04:00
Notification.hs Notification: Add action/status-dependent icon and urgency 2014-04-05 20:45:11 +03:00
Path.hs move programPath out of Config.Files to Annex.Path 2013-11-24 16:03:03 -04:00
Perms.hs Ensure execute bit is set on directories when core.sharedrepsitory is set. 2013-11-18 18:13:09 -04:00
Queue.hs type based git config handling for remotes 2013-01-01 13:58:14 -04:00
Quvi.hs Probe for quvi version at run time. 2014-02-28 14:54:02 -04:00
ReplaceFile.hs Put non-object tmp files in .git/annex/misctmp, leaving .git/annex/tmp for only partially transferred objects. 2014-02-26 16:52:56 -04:00
Ssh.hs export CreateProcess fields from Utility.Process 2014-06-10 19:20:14 -04:00
TaggedPush.hs remove Read instance for Ref 2014-02-19 01:19:57 -04:00
Transfer.hs notifications on drop 2014-03-22 15:01:48 -04:00
Url.hs add UrlOptions sum type 2014-02-24 22:00:25 -04:00
UUID.hs reinit: New command that can initialize a new reposotory using the configuration of a previously known repository. Useful if a repository got deleted and you want to clone it back the way it was. 2014-04-15 20:13:35 -04:00
VariantFile.hs sync: Fix bug in direct mode that caused a file not checked into git to be deleted when merging with a remote that added a file by the same name. (Thanks, jkt) 2014-03-03 14:57:16 -04:00
Version.hs Auto-upgrade v3 indirect repos to v5 with no changes. This also fixes a problem when a direct mode repo was somehow set to v3 rather than v4, and so the automatic direct mode upgrade to v5 was not done. 2013-12-29 13:06:23 -04:00
View.hs support commit.gpgsign 2014-07-04 11:53:51 -04:00
Wanted.hs fix transfers of key with no associated file 2014-01-23 16:44:02 -04:00