git-repack-scripton commit [PATCH] Documentation: describe short-hand used in fetch/pull. (0c04094)
   1#!/bin/sh
   2. git-sh-setup-script || die "Not a git archive"
   3        
   4rm -f .tmp-pack-*
   5packname=$(git-rev-list --unpacked --objects $(git-rev-parse --all) |
   6        git-pack-objects --non-empty --incremental .tmp-pack) ||
   7        exit 1
   8if [ -z "$packname" ]; then
   9        echo Nothing new to pack
  10        exit 0
  11fi
  12mkdir -p "$GIT_OBJECT_DIRECTORY/pack" &&
  13mv .tmp-pack-$packname.pack "$GIT_OBJECT_DIRECTORY/pack/pack-$packname.pack" &&
  14mv .tmp-pack-$packname.idx  "$GIT_OBJECT_DIRECTORY/pack/pack-$packname.idx"