]> source.dussan.org Git - jgit.git/commit
Add support for git config repack.packKeptObjects 20/204820/8
authorAntonio Barone <syntonyze@gmail.com>
Thu, 5 Oct 2023 19:58:13 +0000 (21:58 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 12 Oct 2023 20:51:14 +0000 (22:51 +0200)
commitf103a1d5c605f5f4545050c1176a9a202151f942
tree0e02f74591968f0f983156f97ec6eec0ef75fe9c
parentf5f4bf0ad97f67ff56db18033c0a0795b722e96e
Add support for git config repack.packKeptObjects

Change Ide3445e652 introduced the `--pack-kept-objects` option to GC for
including the objects contained in the locked packfiles during the
repack phase.

Whilst this allowed to explicitly pass a command line argument to the
jgit gc program, it did not allow the option to be read from
configuration.

Allow the pack kept objects option to be configured exactly as C-Git
documents [1], by introducing a new `repack.packKeptObjects`
configuration.

`repack.packKeptObjects` defaults to `true`, when the
`pack.buildBitmaps` is `true` (which is the default case), `false`
otherwise.

[1] https://git-scm.com/docs/git-config#Documentation/git-config.txt-repackpackKeptObjects

Bug: 582292
Change-Id: Ia931667277410d71bc079d27c097a57094299840
Documentation/config-options.md
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcKeepFilesTest.java
org.eclipse.jgit/.settings/.api_filters
org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java