diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-09-05 09:34:44 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-07 10:59:23 -0700 |
commit | f46c46e4f22506a01aa0033b37ef027d9e87585f (patch) | |
tree | aba3183a8d5aac00ae02be06c5bf7d8a1439f28d /attr.h | |
parent | bundle API: change "flags" to be "extra_index_pack_args" (diff) | |
download | tgif-f46c46e4f22506a01aa0033b37ef027d9e87585f.tar.xz |
index-pack: add --progress-title option
Add a --progress-title option to index-pack, when data is piped into
index-pack its progress is a proxy for whatever's feeding it data.
This option will allow us to set a more relevant progress bar title in
"git bundle unbundle", and is also used in my "bundle-uri" RFC
patches[1] by a new caller in fetch-pack.c.
The code change in cmd_index_pack() won't handle
"--progress-title=xyz", only "--progress-title xyz", and the "(i+1)"
style (as opposed to "i + 1") is a bit odd.
Not using the "--long-option=value" style is inconsistent with
existing long options handled by cmd_index_pack(), but makes the code
that needs to call it better (two strvec_push(), instead of needing a
strvec_pushf()). Since the option is internal-only the inconsistency
shouldn't matter.
I'm copying the pattern to handle it as-is from the handling of the
existing "-o" option in the same function, see 9cf6d3357aa (Add
git-index-pack utility, 2005-10-12) for its addition. That's a short
option, but the code to implement the two is the same in functionality
and style. Eventually we'd like to migrate all of this this to
parse_options(), which would make these differences in behavior go
away.
1. https://lore.kernel.org/git/RFC-cover-00.13-0000000000-20210805T150534Z-avarab@gmail.com/
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'attr.h')
0 files changed, 0 insertions, 0 deletions