t / perf / p5304-prune.shon commit Merge branch 'tg/glossary-overlay' (b024a14)
   1#!/bin/sh
   2
   3test_description='performance tests of prune'
   4. ./perf-lib.sh
   5
   6test_perf_default_repo
   7
   8test_expect_success 'remove reachable loose objects' '
   9        git repack -ad
  10'
  11
  12test_expect_success 'remove unreachable loose objects' '
  13        git prune
  14'
  15
  16test_expect_success 'confirm there are no loose objects' '
  17        git count-objects | grep ^0
  18'
  19
  20test_perf 'prune with no objects' '
  21        git prune
  22'
  23
  24test_expect_success 'repack with bitmaps' '
  25        git repack -adb
  26'
  27
  28# We have to create the object in each trial run, since otherwise
  29# runs after the first see no object and just skip the traversal entirely!
  30test_perf 'prune with bitmaps' '
  31        echo "probably not present in repo" | git hash-object -w --stdin &&
  32        git prune
  33'
  34
  35test_done