]> source.dussan.org Git - jgit.git/commit
Add pack-refs command to the CLI 44/1202844/12 master
authorYash Chaturvedi <quic_zeref@quicinc.com>
Thu, 14 Nov 2024 14:33:08 +0000 (20:03 +0530)
committerYash Chaturvedi <quic_zeref@quicinc.com>
Fri, 22 Nov 2024 04:37:07 +0000 (10:07 +0530)
commit6fa28d7677f8242d73dc32294fa7db6e86c23b25
treee686e175629ef24f43490f76e84595b9258541e4
parentf295477b1925cc272c6219126daf1fd7cfc5b602
Add pack-refs command to the CLI

This command can be used to optimize storage of references.

For a RefDirectory database, it packs non-symbolic, loose refs into
packed-refs. By default, only the references under '$GIT_DIR/refs/tags'
are packed. The '--all' option can be used to pack all the references
under '$GIT_DIR/refs'.

For Reftable, all refs are compacted into a single table.

Change-Id: I92e786403f8638d35ae3037844a7ad89e8959e02
14 files changed:
org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/PackRefsTest.java [new file with mode: 0644]
org.eclipse.jgit.pgm/META-INF/services/org.eclipse.jgit.pgm.TextBuiltin
org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/PackRefs.java [new file with mode: 0644]
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
org.eclipse.jgit/src/org/eclipse/jgit/api/PackRefsCommand.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableDatabase.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java