projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
php composer updates
[feisty_meow.git]
/
scripts
/
rev_control
/
compact_git.sh
diff --git
a/scripts/rev_control/compact_git.sh
b/scripts/rev_control/compact_git.sh
index 8de72543f7ad3c969e597499ffed720e0a9e50bf..8f13c0571b1e44c6abee28312b0f91316d003a5a 100644
(file)
--- a/
scripts/rev_control/compact_git.sh
+++ b/
scripts/rev_control/compact_git.sh
@@
-2,16
+2,32
@@
# compresses the git archive in the folder specified.
# compresses the git archive in the folder specified.
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+source "$FEISTY_MEOW_SCRIPTS/rev_control/version_control.sh"
+
+save_terminal_title
+
+##############
+
prune_dir="$1"
if [ -z "$prune_dir" ]; then
prune_dir="$(pwd)"
fi
prune_dir="$1"
if [ -z "$prune_dir" ]; then
prune_dir="$(pwd)"
fi
-pushd "$prune_dir"
+pushd "$prune_dir" &>/dev/null
+exit_on_error "changing to directory: $prune_dir"
+
echo "cleaning git repo in directory $(pwd)"
echo "cleaning git repo in directory $(pwd)"
+
git fsck --full
git fsck --full
-test_or_die "git fsck"
+exit_on_error "git fsck"
+
git gc --prune=today --aggressive
git gc --prune=today --aggressive
-test_or_die "git gc"
+exit_on_error "git gc"
+
git repack
git repack
-test_or_die "git repack"
-popd
+exit_on_error "git repack"
+
+popd &>/dev/null
+
+restore_terminal_title
+