### Please describe the problem.

[[!tag moreinfo]]

I added a lot of files to my annex in direct mode. Now I want to switch to indirect mode. git-annex status and indirect create an out-of-memory error.

### What steps will reproduce the problem?

I am not really sure, I added a lot of files to the annex, almost 3TB.
Then either git-annex status or git-annex indirect cause a similar error (see below).


### What version of git-annex are you using? On what operating system?

git-annex version: 4.20130501-g4a5bfb3
local repository version: 4
default repository version: 3
supported repository versions: 3 4
upgrade supported from repository versions: 0 1 2
build flags: Assistant Webapp Pairing Testsuite S3 WebDAV Inotify DBus XMPP

Ubuntu precise
3.2.0-26-generic


### Please provide any additional information below.

[[!format sh """
# If you can, paste a complete transcript of the problem occurring here.
# If the problem is with the git-annex assistant, paste in .git/annex/debug.log
git-annex status
supported backends: SHA256E SHA1E SHA512E SHA224E SHA384E SHA256 SHA1 SHA512 SHA224 SHA384 WORM URL
supported remote types: git S3 bup directory rsync web webdav glacier hook
repository mode: direct
trusted repositories: 0
semitrusted repositories: 7
	00000000-0000-0000-0000-000000000001 -- web
 	0b8e6666-80d5-11e2-adf3-6f4d3d6ef0aa -- marek@x4:~/tmp/annex
 	65c057c6-6027-11e2-84b0-b77d71696e49 -- here (.)
 	96b31c5e-6524-11e2-b136-fbd1a03b2799 -- BackupOnGlacier
 	b509c388-629a-11e2-be5f-d376e201ad86 -- marek@x201:~/AllData
 	c636e33c-6e31-11e2-a9c4-a3c5546d69d9 -- desktop
 	fbaa1c3a-60d7-11e2-842f-9348368d2f4c -- .
untrusted repositories: 0
dead repositories: 0
transfers in progress: none
available local disk space: 81 gigabytes (+1 megabyte reserved)
temporary directory size: 9 megabytes (clean up with git-annex unused)
local annex keys: 61396
local annex size: 3 terabytes
known annex keys: git-annex: out of memory (requested 985661440 bytes)

OR

git-annex indirect
commit  git-annex: out of memory (requested 985661440 bytes)





# End of transcript or log.
"""]]

> [[fixed|done]]. However, if you saw this behavior,
> you have large files checked directly into git. You may
> want to examine your repository and use git filter-branch to clean
> it up.
> --[[Joey]] 
