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
 # Perform extra aggressive garbage collection
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
 git \
11
 git \
10
     -c gc.reflogExpire=0 \
12
     -c gc.reflogExpire=0 \
11
     -c gc.reflogExpireUnreachable=0 \
13
     -c gc.reflogExpireUnreachable=0 \
13
     -c gc.rerereunresolved=0 \
15
     -c gc.rerereunresolved=0 \
14
     -c gc.pruneExpire=now \
16
     -c gc.pruneExpire=now \
15
     gc
17
     gc
16
-du -hs .git
18
+du -hs "$XTRAGC_REFDIR"