]> source.dussan.org Git - jgit.git/commit
gc: Add options to preserve and prune old pack files 69/87969/5
authorJames Melvin <jmelvin@codeaurora.org>
Tue, 3 Jan 2017 18:41:56 +0000 (11:41 -0700)
committerChristian Halstrick <christian.halstrick@sap.com>
Thu, 19 Jan 2017 10:00:18 +0000 (11:00 +0100)
commit91132bb05e767694d35230d515443d54ddc4eff6
treedfeffd43c1a25f91a05b376a8ca7b1ebf2acb528
parentd3148f300a06dec78875283bb8fdf1d350c4243d
gc: Add options to preserve and prune old pack files

The new --preserve-oldpacks option moves old pack files into the
preserved subdirectory instead of deleting them after repacking.

The new --prune-preserved option prunes old pack files from the
preserved subdirectory after repacking, but before potentially
moving the latest old packfiles to this subdirectory.

These options are designed to prevent stale file handle exceptions
during git operations which can happen on users of NFS repos when
repacking is done on them. The strategy is to preserve old pack files
around until the next repack with the hopes that they will become
unreferenced by then and not cause any exceptions to running processes
when they are finally deleted (pruned).

Change-Id: If3f729f0d9ce920ee2c3e6acdde46f2068be61d2
Signed-off-by: James Melvin <jmelvin@codeaurora.org>
org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcBasicPackingTest.java
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/internal/storage/file/ObjectDirectory.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java