summaryrefslogtreecommitdiff
path: root/contrib/examples/git-gc.sh
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2018-03-25 20:46:53 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-03-26 13:48:50 -0700
commit49eb8d39c78f161231e63293df60f343d208f409 (patch)
tree877abb15a47d8f0185fffa0103f78a66382a02e9 /contrib/examples/git-gc.sh
parentSync with Git 2.16.3 (diff)
downloadtgif-49eb8d39c78f161231e63293df60f343d208f409.tar.xz
Remove contrib/examples/*
There were some side discussions at Git Merge this year about how we should just update the README to tell users they can dig these up from the history if the need them, do that. Looking at the "git log" for this directory we get quite a bit more patch churn than we should here, mainly from things fixing various tree-wide issues. There's also confusion on the list occasionally about how these should be treated, "Re: [PATCH 1/4] stash: convert apply to builtin" (<CA+CzEk9QpmHK_TSBwQfEedNqrcVSBp3xY7bdv1YA_KxePiFeXw@mail.gmail.com>) being the latest example of that. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/examples/git-gc.sh')
-rwxr-xr-xcontrib/examples/git-gc.sh37
1 files changed, 0 insertions, 37 deletions
diff --git a/contrib/examples/git-gc.sh b/contrib/examples/git-gc.sh
deleted file mode 100755
index 1597e9f33f..0000000000
--- a/contrib/examples/git-gc.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2006, Shawn O. Pearce
-#
-# Cleanup unreachable files and optimize the repository.
-
-USAGE='[--prune]'
-SUBDIRECTORY_OK=Yes
-. git-sh-setup
-
-no_prune=:
-while test $# != 0
-do
- case "$1" in
- --prune)
- no_prune=
- ;;
- --)
- usage
- ;;
- esac
- shift
-done
-
-case "$(git config --get gc.packrefs)" in
-notbare|"")
- test $(is_bare_repository) = true || pack_refs=true;;
-*)
- pack_refs=$(git config --bool --get gc.packrefs)
-esac
-
-test "true" != "$pack_refs" ||
-git pack-refs --prune &&
-git reflog expire --all &&
-git-repack -a -d -l &&
-$no_prune git prune &&
-git rerere gc || exit