Exploding Git Repositories
Why not just always run git under memory limits?For example:  %  ulimit -a
  -t: cpu time (seconds)              unlimited
  -f: file size (blocks)              unlimited
  -d: data seg size (kbytes)          unlimited
  -s: stack size (kbytes)             8192
  -c: core file size (blocks)         0
  -m: resident set size (kbytes)      unlimited
  -u: processes                       30127
  -n: file descriptors                1024
  -l: locked-in-memory size (kbytes)  unlimited
  -v: address space (kbytes)          unlimited
  -x: file locks                      unlimited
  -i: pending signals                 30127
  -q: bytes in POSIX msg queues       819200
  -e: max nice                        30
  -r: max rt priority                 99
  -N 15:                              unlimited
  %  ulimit -d $((100 * 1024)) # 100 MB
  %  ulimit -m $((100 * 1024)) # 100 MB
  %  ulimit -l $((100 * 1024)) # 100 MB
  %  ulimit -v $((100 * 1024)) # 100 MB
  %  git clone https://github.com/Katee/git-bomb.git
  Cloning into 'git-bomb'...
  remote: Counting objects: 18, done.
  remote: Compressing objects: 100% (6/6), done.
  remote: Total 18 (delta 2), reused 0 (delta 0), pack-reused 12
  Unpacking objects: 100% (18/18), done.
  fatal: Out of memory, malloc failed (tried to allocate 118 bytes)
  warning: Clone succeeded, but checkout failed.
  You can inspect what was checked out with 'git status'
  and retry the checkout with 'git checkout -f HEAD'