File tree Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Expand file tree Collapse file tree 3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -321,6 +321,17 @@ format.headers::
321
321
Additional email headers to include in a patch to be submitted
322
322
by mail. See gitlink:git-format-patch[1].
323
323
324
+ gc.packrefs::
325
+ `git gc` does not run `git pack-refs` in a bare repository by
326
+ default so that older dumb-transport clients can still fetch
327
+ from the repository. Setting this to `true` lets `git
328
+ gc` to run `git pack-refs`. Setting this to `false` tells
329
+ `git gc` never to run `git pack-refs`. The default setting is
330
+ `notbare`. Enable it only when you know you do not have to
331
+ support such clients. The default setting will change to `true`
332
+ at some stage, and setting this to `false` will continue to
333
+ prevent `git pack-refs` from being run from `git gc`.
334
+
324
335
gc.reflogexpire::
325
336
`git reflog expire` removes reflog entries older than
326
337
this time; defaults to 90 days.
Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ The optional configuration variable 'gc.rerereunresolved' indicates
62
62
how long records of conflicted merge you have not resolved are
63
63
kept. This defaults to 15 days.
64
64
65
+ The optional configuration variable 'gc.packrefs' determines if
66
+ `git gc` runs `git-pack-refs`. Without the configuration, `git-pack-refs`
67
+ is not run in bare repositories by default, to allow older dumb-transport
68
+ clients fetch from the repository, but this will change in the future.
65
69
66
70
See Also
67
71
--------
Original file line number Diff line number Diff line change 22
22
shift
23
23
done
24
24
25
+ case " $( git config --get gc.packrefs) " in
26
+ notbare|" " )
27
+ test $( is_bare_repository) = true || pack_refs=true;;
28
+ * )
29
+ pack_refs=$( git config --bool --get gc.packrefs)
30
+ esac
31
+
32
+ test " true" ! = " $pack_refs " ||
25
33
git-pack-refs --prune &&
26
34
git-reflog expire --all &&
27
35
git-repack -a -d -l &&
You can’t perform that action at this time.
0 commit comments