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

Re: [PATCH v3 5/7] refs: add pseudorefs array and iteration functions

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 7, 2024, 22:02 UTC
Message-ID
<xmqqcyt853vz.fsf@gitster.g>
In-Reply-To
<ZcEvLwp0t8-rcyGn@five231003>
Kousik Sanagavarapu <five231003@gmail.com> writes:
Show 28 quoted lines
> Andy Koppe <andy.koppe@gmail.com> wrote:
> ...
>> +static const char *const pseudorefs[] = {
>> +	"FETCH_HEAD",
>> +	"ORIG_HEAD",
>> +	"MERGE_HEAD",
>> +	"REBASE_HEAD",
>> +	"CHERRY_PICK_HEAD",
>> +	"REVERT_HEAD",
>> +	"BISECT_HEAD",
>> +	"AUTO_MERGE",
>> +};
>> +
>>  struct ref_namespace_info ref_namespace[] = {
>>  	[NAMESPACE_HEAD] = {
>>  		.ref = "HEAD",
>> @@ -1549,6 +1564,33 @@ int head_ref(each_ref_fn fn, void *cb_data)
>>  	return refs_head_ref(get_main_ref_store(the_repository), fn, cb_data);
>>  }
>
> The first thing that popped up in my head was "Should we somehow use
> is_pseudoref_syntax() instead of manually listing these?" (although I
> read in this thread later that Junio was okay with the listing) but then ...
>
> I thought I saw something similar in some other thread (which entered
> the mailing list much after this patch series was submitted) ...
>
> 	https://lore.kernel.org/git/20231221170715.110565-2-karthik.188@gmail.com/T/

We are halting Karthik's topic to rethink its UI for now, but your point stands. We should use a unified definition of what pseudorefs there are across the codebase for consistency, and Karthik's topic would be a better place to do so.

Andy, let me drop this topic for now from my tree, and let's wait until Karthik's "iterate over all refs" topic solidifies, at which time an updated iteration (v4?) of this topic hopefully can build on top of it.

Thanks.
Previous: Kousik SanagavarapuNext: Andy Koppe
Message 21 of 31 in “decorate: add color.decorate.symbols config option”
  1. decorate: add color.decorate.symbols config optionAndy Koppe, Oct 3, 2023
  2. 0/7 log: decorate pseudorefs and other refsAndy Koppe, Oct 19, 2023
  3. Junio C HamanoOct 22, 2023
  4. Andy KoppeOct 22, 2023
  5. Junio C HamanoOct 23, 2023
  6. Andy KoppeOct 23, 2023
  7. 0/6 log: decorate pseudorefs and other refsAndy Koppe, Oct 22, 2023
  8. 1/6 config: restructure color.decorate documentationAndy Koppe, Oct 22, 2023
  9. 2/6 log: add color.decorate.symbol config variableAndy Koppe, Oct 22, 2023
  10. 3/6 log: add color.decorate.ref config variableAndy Koppe, Oct 22, 2023
  11. 4/6 refs: add pseudorefs array and iteration functionsAndy Koppe, Oct 22, 2023
  12. 5/6 refs: exempt pseudorefs from pattern prefixingAndy Koppe, Oct 22, 2023
  13. 6/6 log: add color.decorate.pseudoref config variableAndy Koppe, Oct 22, 2023
  14. 0/7 log: decorate pseudorefs and other refsAndy Koppe, Oct 23, 2023
  15. 1/7 config: restructure color.decorate documentationAndy Koppe, Oct 23, 2023
  16. 2/7 log: use designated inits for decoration_colorsAndy Koppe, Oct 23, 2023
  17. 4/7 log: add color.decorate.ref config variableAndy Koppe, Oct 23, 2023
  18. 5/7 refs: add pseudorefs array and iteration functionsAndy Koppe, Oct 23, 2023
  19. Junio C HamanoOct 24, 2023
  20. Kousik SanagavarapuFeb 5, 2024
  21. Junio C HamanoFeb 7, 2024
  22. 3/7 log: add color.decorate.symbol config variableAndy Koppe, Oct 23, 2023
  23. 6/7 refs: exempt pseudorefs from pattern prefixingAndy Koppe, Oct 23, 2023
  24. 7/7 log: add color.decorate.pseudoref config variableAndy Koppe, Oct 23, 2023
  25. 1/7 config: restructure color.decorate documentationAndy Koppe, Oct 19, 2023
  26. 2/7 log: use designated inits for decoration_colorsAndy Koppe, Oct 19, 2023
  27. 3/7 log: add color.decorate.symbol config optionAndy Koppe, Oct 19, 2023
  28. 4/7 refs: separate decoration type from default filterAndy Koppe, Oct 19, 2023
  29. 5/7 log: add color.decorate.ref option for other refsAndy Koppe, Oct 19, 2023
  30. 6/7 refs: exempt pseudoref patterns from prefixingAndy Koppe, Oct 19, 2023
  31. 7/7 log: show pseudorefs in decorationsAndy Koppe, Oct 19, 2023

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.