From 61bc05e46119befe3cbc74c76abc0d5087721984 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Tue, 29 Apr 2014 11:32:54 +0200 Subject: [PATCH] Fix documentation and add license header for reposize.sh Change-Id: I474f9a800443fcaa76c764132c25b6aab7342999 Signed-off-by: Matthias Sohn --- contrib/reposize.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/contrib/reposize.sh b/contrib/reposize.sh index 3699edcde1..70b17760c9 100755 --- a/contrib/reposize.sh +++ b/contrib/reposize.sh @@ -1,8 +1,24 @@ #!/bin/bash -# Shows you the largest objects in your repo's pack files. +# +# Copyright (C) 2014 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Show n largest objects in a git repo's pack files. # # usage: -# $ git-find-big-blobs 100 # find and list biggest 100 objects +# $ reposize.sh 100 # find and list biggest 100 objects +# # derived from # http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/ @@ -38,7 +54,7 @@ IFS=$'\n'; # list all objects including their size, sort by size, take top $1 biggest blobs objects=$(git verify-pack -v $gitdir/objects/pack/pack-*.idx | grep -v chain | sort -k3nr | head -n $1) -echo "All sizes are in kB's. The pack column is the size of the object, compressed, inside the pack file." +echo "All sizes are in kiB's. The pack column is the size of the object, compressed, inside the pack file." output="size,pack,SHA,location" for y in $objects