git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 3/4] index-pack: add --progress-title option

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 24, 2021, 21:40 UTC
Message-ID
<87a6l6ed1e.fsf@evledraar.gmail.com>
In-Reply-To
<f081ac63-cb5c-1777-d9df-828382637ed1@gmail.com>
On Tue, Aug 24 2021, Derrick Stolee wrote:
Show 11 quoted lines
> On 8/23/2021 7:02 AM, Ævar Arnfjörð Bjarmason wrote:
>> +--progress-title::
>> +	For internal use only.
>> ++
>> +Set the title of the "Receiving objects" progress bar (it's "Indexing
>> +objects" under `--stdin`).
>
> May I suggest a minor edit:
>
>   Set the title of the progress bar. The title is "Receiving objects"
>   by default and "Indexing objects" when `--stdin` is specified.
Thanks.
Show 18 quoted lines
>> @@ -1806,6 +1808,10 @@ int cmd_index_pack(int argc, const char **argv, const char *prefix)
>>  				input_len = sizeof(*hdr);
>>  			} else if (!strcmp(arg, "-v")) {
>>  				verbose = 1;
>> +			} else if (!strcmp(arg, "--progress-title")) {
>
> Unfortunate that we are not using the parse-opts API. Not your fault.
>
>> +				if (progress_title || (i+1) >= argc)
>
> style nit:
>
> 	if (progress_title || i + 1 >= argc)
>
> Although, I notice a similar line elsewhere in the file, so this gets
> a pass.
>
> 	if (index_name || (i+1) >= argc)

Yeah, it's exactly copy/pasted from another thing doing the same sort of parsing in this file. Will keep it the same for this new code, and just note it.

I think any subsequent change to refactor it will be easier if it's all consistent, v.s. some using i + 1, another putting it in parenthesis etc.

Show 10 quoted lines
>> +					usage(index_pack_usage);
>> +				progress_title = argv[++i];
>
> One downside to this organization is that `--progress-title=X` will
> not work here. There are other `--<option-name>=X` options in this
> builtin, and the index output name is specified with the short name
> `-o X`. We should probably err to match the `--<option-name>=X`
> pattern in this file for now. An eventual conversion to standard
> option parsing would be helpful here, but I don't think is worth
> blocking this series.
*nod*.
Previous: Derrick StoleeNext: Ævar Arnfjörð Bjarmason
Message 16 of 42 in “bundle: show progress on "unbundle"”
  1. 0/4 bundle: show progress on "unbundle"Ævar Arnfjörð Bjarmason, Jul 27, 2021
  2. 2/4 bundle API: change "flags" to be "extra_index_pack_args"Ævar Arnfjörð Bjarmason, Jul 27, 2021
  3. 1/4 bundle API: start writing API documentationÆvar Arnfjörð Bjarmason, Jul 27, 2021
  4. 3/4 index-pack: add --progress-title optionÆvar Arnfjörð Bjarmason, Jul 27, 2021
  5. 4/4 bundle: show progress on "unbundle"Ævar Arnfjörð Bjarmason, Jul 27, 2021
  6. 0/4 bundle: show progress on "unbundle"Ævar Arnfjörð Bjarmason, Aug 23, 2021
  7. 2/4 bundle API: change "flags" to be "extra_index_pack_args"Ævar Arnfjörð Bjarmason, Aug 23, 2021
  8. Derrick StoleeAug 24, 2021
  9. Ævar Arnfjörð BjarmasonAug 24, 2021
  10. Derrick StoleeAug 24, 2021
  11. 1/4 bundle API: start writing API documentationÆvar Arnfjörð Bjarmason, Aug 23, 2021
  12. Derrick StoleeAug 24, 2021
  13. Ævar Arnfjörð BjarmasonAug 24, 2021
  14. 3/4 index-pack: add --progress-title optionÆvar Arnfjörð Bjarmason, Aug 23, 2021
  15. Derrick StoleeAug 24, 2021
  16. Ævar Arnfjörð BjarmasonAug 24, 2021
  17. 4/4 bundle: show progress on "unbundle"Ævar Arnfjörð Bjarmason, Aug 23, 2021
  18. Derrick StoleeAug 24, 2021
  19. Ævar Arnfjörð BjarmasonAug 24, 2021
  20. 0/5 bundle: show progress on "unbundle"Ævar Arnfjörð Bjarmason, Aug 26, 2021
  21. 1/5 bundle API: start writing API documentationÆvar Arnfjörð Bjarmason, Aug 26, 2021
  22. 3/5 bundle API: change "flags" to be "extra_index_pack_args"Ævar Arnfjörð Bjarmason, Aug 26, 2021
  23. Junio C HamanoAug 28, 2021
  24. 2/5 strvec: add a strvec_pushvec()Ævar Arnfjörð Bjarmason, Aug 26, 2021
  25. Junio C HamanoAug 28, 2021
  26. Junio C HamanoAug 28, 2021
  27. Jeff KingAug 28, 2021
  28. Junio C HamanoAug 29, 2021
  29. Derrick StoleeAug 30, 2021
  30. Ævar Arnfjörð BjarmasonSep 2, 2021
  31. Junio C HamanoSep 3, 2021
  32. Jeff KingSep 3, 2021
  33. 4/5 index-pack: add --progress-title optionÆvar Arnfjörð Bjarmason, Aug 26, 2021
  34. Junio C HamanoAug 28, 2021
  35. 5/5 bundle: show progress on "unbundle"Ævar Arnfjörð Bjarmason, Aug 26, 2021
  36. Junio C HamanoAug 28, 2021
  37. Ævar Arnfjörð BjarmasonSep 2, 2021
  38. 0/4 bundle: show progress on "unbundle"Ævar Arnfjörð Bjarmason, Sep 5, 2021
  39. 1/4 bundle API: start writing API documentationÆvar Arnfjörð Bjarmason, Sep 5, 2021
  40. 2/4 bundle API: change "flags" to be "extra_index_pack_args"Ævar Arnfjörð Bjarmason, Sep 5, 2021
  41. 3/4 index-pack: add --progress-title optionÆvar Arnfjörð Bjarmason, Sep 5, 2021
  42. 4/4 bundle: show progress on "unbundle"Ævar Arnfjörð Bjarmason, Sep 5, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.