| 1 | --all:: |
| 2 | |
| 3 | The command by default packs all tags and refs that are already |
| 4 | packed, and leaves other refs |
| 5 | alone. This is because branches are expected to be actively |
| 6 | developed and packing their tips does not help performance. |
| 7 | This option causes all refs to be packed as well, with the exception |
| 8 | of hidden refs, broken refs, and symbolic refs. Useful for a repository |
| 9 | with many branches of historical interests. |
| 10 | |
| 11 | --no-prune:: |
| 12 | |
| 13 | The command usually removes loose refs under `$GIT_DIR/refs` |
| 14 | hierarchy after packing them. This option tells it not to. |
| 15 | |
| 16 | --auto:: |
| 17 | |
| 18 | Pack refs as needed depending on the current state of the ref database. The |
| 19 | behavior depends on the ref format used by the repository and may change in the |
| 20 | future. |
| 21 | + |
| 22 | - "files": Loose references are packed into the `packed-refs` file |
| 23 | based on the ratio of loose references to the size of the |
| 24 | `packed-refs` file. The bigger the `packed-refs` file, the more loose |
| 25 | references need to exist before we repack. |
| 26 | + |
| 27 | - "reftable": Tables are compacted such that they form a geometric |
| 28 | sequence. For two tables N and N+1, where N+1 is newer, this |
| 29 | maintains the property that N is at least twice as big as N+1. Only |
| 30 | tables that violate this property are compacted. |
| 31 | |
| 32 | --include <pattern>:: |
| 33 | |
| 34 | Pack refs based on a `glob(7)` pattern. Repetitions of this option |
| 35 | accumulate inclusion patterns. If a ref is both included in `--include` and |
| 36 | `--exclude`, `--exclude` takes precedence. Using `--include` will preclude all |
| 37 | tags from being included by default. Symbolic refs and broken refs will never |
| 38 | be packed. When used with `--all`, it will be a noop. Use `--no-include` to clear |
| 39 | and reset the list of patterns. |
| 40 | |
| 41 | --exclude <pattern>:: |
| 42 | |
| 43 | Do not pack refs matching the given `glob(7)` pattern. Repetitions of this option |
| 44 | accumulate exclusion patterns. Use `--no-exclude` to clear and reset the list of |
| 45 | patterns. If a ref is already packed, including it with `--exclude` will not |
| 46 | unpack it. |
| 47 | + |
| 48 | When used with `--all`, pack only loose refs which do not match any of |
| 49 | the provided `--exclude` patterns. |
| 50 | + |
| 51 | When used with `--include`, refs provided to `--include`, minus refs that are |
| 52 | provided to `--exclude` will be packed. |