t / t5304-prune.shon commit Fix make_absolute_path() for parameters without a slash (e371a4c)
   1#!/bin/sh
   2#
   3# Copyright (c) 2008 Johannes E. Schindelin
   4#
   5
   6test_description='prune'
   7. ./test-lib.sh
   8
   9test_expect_success setup '
  10
  11        : > file &&
  12        git add file &&
  13        test_tick &&
  14        git commit -m initial &&
  15        git gc
  16
  17'
  18
  19test_expect_success 'prune stale packs' '
  20
  21        orig_pack=$(echo .git/objects/pack/*.pack) &&
  22        : > .git/objects/tmp_1.pack &&
  23        : > .git/objects/tmp_2.pack &&
  24        test-chmtime -86501 .git/objects/tmp_1.pack &&
  25        git prune --expire 1.day &&
  26        test -f $orig_pack &&
  27        test -f .git/objects/tmp_2.pack &&
  28        ! test -f .git/objects/tmp_1.pack
  29
  30'
  31
  32test_done