Browse Source

Have xtragc x-tra feature work in bare repos as well

Alois Mahdal 6 years ago
parent
commit
538d3415e7
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      dotfiles/gittum/bin/xtragc

+ 4
- 2
dotfiles/gittum/bin/xtragc View File

@@ -4,8 +4,10 @@
4 4
 # Perform extra aggressive garbage collection
5 5
 #
6 6
 
7
+XTRAGC_REFDIR=.
8
+test -d ".git" && XTRAGC_REFDIR=".git"
7 9
 
8
-du -hs .git
10
+du -hs "$XTRAGC_REFDIR"
9 11
 git \
10 12
     -c gc.reflogExpire=0 \
11 13
     -c gc.reflogExpireUnreachable=0 \
@@ -13,4 +15,4 @@ git \
13 15
     -c gc.rerereunresolved=0 \
14 16
     -c gc.pruneExpire=now \
15 17
     gc
16
-du -hs .git
18
+du -hs "$XTRAGC_REFDIR"