]> git.phdru.name Git - git-scripts.git/commitdiff
Add gc-expire scripts
authorOleg Broytman <phd@phdru.name>
Sat, 3 Feb 2018 03:30:05 +0000 (06:30 +0300)
committerOleg Broytman <phd@phdru.name>
Sat, 3 Feb 2018 03:30:05 +0000 (06:30 +0300)
gc-expire [new file with mode: 0755]
gc-expire-repack [new file with mode: 0755]

diff --git a/gc-expire b/gc-expire
new file mode 100755 (executable)
index 0000000..13f8a41
--- /dev/null
+++ b/gc-expire
@@ -0,0 +1,4 @@
+#! /bin/sh
+
+git reflog expire --expire=now --all &&
+exec git gc --aggressive --prune=now
diff --git a/gc-expire-repack b/gc-expire-repack
new file mode 100755 (executable)
index 0000000..333bb6c
--- /dev/null
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+git reflog expire --expire=now --all &&
+git gc --aggressive --prune=now &&
+
+git reflog expire --expire-unreachable=0 --all &&
+git repack -A -d &&
+exec git prune