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

Re: [PATCH v2 05/11] gitweb: git_split_heads_body function.

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 16, 2008, 12:12 UTC
Message-ID
<200811161312.50090.jnareb@gmail.com>
In-Reply-To
<cb7bb73a0811150425j2475db8dsdee57c1cc5e208ab@mail.gmail.com>
Giuseppe Bilotta wrote:
Show 14 quoted lines
> On Sat, Nov 15, 2008 at 1:14 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Jakub Narebski <jnareb@gmail.com> writes:
>>
>>> Second, this patch wouldn't do what you want from it if there are
>>> remotes with '/' in name.  I for example use "gsoc2008/gitweb-caching"
>>> for Lea Wiemann repository with her GSoC 2008 work on adding caching
>>> to gitweb.
>>
>> I think your point is if you also use gsoc2008/gitstats from another
>> remote repository, these two sets of remote tracking branches will be
>> shown grouped together.  But is it a bad thing?  After all, you chose to
>> use hierarchical names for them, _and_ you chose to use the same toplevel
>> hierarchy name for them.  Doesn't that mean you _wanted_ to have them both
>> appear in the same GSoC 2008 group?

Actually I _don't_ have 'gsoc2008/gitstats' remote, nor gsoc2008/gitstats/* remote-tracking branches. 'gsoc2008/gitweb-caching' is the only remote with hierarchical name. But I digress...

> The problem is that we have gsoc2008/gitweb-caching/branch1
> gsoc2008/gitweb-caching/branch2 gsoc2008/gitstats/branch3
> gsoc2008/gitstats/branch3, and my current code would show
> gitweb-caching/branch1, gitweb-caching/branch2 etc under gsoc2008.

I'm not sure if it wouldn't be simpler solution to just code _sorting_ heads-like view ('heads', 'remotes', 'tags') by ref name, or by age. It would be best to have both, even...

Even without dividing 'remotes' view into subcategories (and subsubcategories) you would have natural grouping:

 gsoc2008/gitweb-caching/branch1
 gsoc2008/gitweb-caching/branch2
 gsoc2008/gitstats/branch3
 gsoc2008/gitstats/branch4
if sorted by branch (ref) name, and not (possibly)
 gsoc2008/gitweb-caching/branch1
 gsoc2008/gitstats/branch4
 origin/todo
 gsoc2008/gitweb-caching/branch2
 gsoc2008/gitstats/branch3
when sorted by age (hmmm... committerdate or authordate?)
Show 8 quoted lines
> Having branch1 and branch2 under gsoc2008/gitweb-caching, and branch3
> and branch4 under gsoc2008/gitstats would be more logical,
> remote-wise, but it would of course lose the coupling between all the
> gsoc2008 remotes.
> 
> If deep nesting is not a problem, I can code something to have
> gitweb-caching and gistats under gsoc2008, and the respective branches
> within.

The problems with nesting is those pesky remotes with only single tracked branch to them; they are I think quote common... well, unless you do one-shot pull, directly into local branch.

All that said, splitting 'remotes' section is difficult; using first dirname as section is probably easiest, and good enough in most cases. That is why I think this part should be put into separate series, to not hinder rest of patches.

-- 
Jakub Narebski
Poland
Previous: Giuseppe BilottaNext: Giuseppe Bilotta
Message 32 of 46 in “gitweb: display remote heads”
  1. 00/11 gitweb: display remote headsGiuseppe Bilotta, Nov 13, 2008
  2. 01/11 gitweb: introduce remote_heads featureGiuseppe Bilotta, Nov 13, 2008
  3. 02/11 gitweb: git_get_heads_list accepts an optional list of refs.Giuseppe Bilotta, Nov 13, 2008
  4. 03/11 gitweb: separate heads and remotes list in summary viewGiuseppe Bilotta, Nov 13, 2008
  5. 04/11 gitweb: optional custom name for refs in git_heads_bodyGiuseppe Bilotta, Nov 13, 2008
  6. 05/11 gitweb: git_split_heads_body function.Giuseppe Bilotta, Nov 13, 2008
  7. 06/11 gitweb: use CSS to style split head lists.Giuseppe Bilotta, Nov 13, 2008
  8. 07/11 gitweb: add 'remotes' actionGiuseppe Bilotta, Nov 13, 2008
  9. 08/11 gitweb: display HEAD in heads list when detachedGiuseppe Bilotta, Nov 13, 2008
  10. 09/11 gitweb: git_is_head_detached() functionGiuseppe Bilotta, Nov 13, 2008
  11. 10/11 gitweb: add HEAD to list of shortlog refs if detachedGiuseppe Bilotta, Nov 13, 2008
  12. 11/11 gitweb: CSS style and refs mark for detached HEADGiuseppe Bilotta, Nov 13, 2008
  13. Jakub NarebskiNov 16, 2008
  14. Jakub NarebskiNov 15, 2008
  15. Junio C HamanoNov 14, 2008
  16. Giuseppe BilottaNov 14, 2008
  17. Junio C HamanoNov 14, 2008
  18. Nanako ShiraishiNov 14, 2008
  19. Jakub NarebskiNov 15, 2008
  20. Jakub NarebskiNov 15, 2008
  21. Jakub NarebskiNov 15, 2008
  22. Giuseppe BilottaNov 15, 2008
  23. Jakub NarebskiNov 16, 2008
  24. Giuseppe BilottaNov 16, 2008
  25. Jakub NarebskiNov 15, 2008
  26. Jakub NarebskiNov 14, 2008
  27. Giuseppe BilottaNov 15, 2008
  28. Jakub NarebskiNov 16, 2008
  29. Giuseppe BilottaNov 16, 2008
  30. Junio C HamanoNov 15, 2008
  31. Giuseppe BilottaNov 15, 2008
  32. Jakub NarebskiNov 16, 2008
  33. Giuseppe BilottaNov 16, 2008
  34. Jakub NarebskiNov 16, 2008
  35. Giuseppe BilottaNov 16, 2008
  36. Jakub NarebskiNov 14, 2008
  37. Giuseppe BilottaNov 15, 2008
  38. Jakub NarebskiNov 14, 2008
  39. Giuseppe BilottaNov 14, 2008
  40. Jakub NarebskiNov 14, 2008
  41. Giuseppe BilottaNov 14, 2008
  42. Jakub NarebskiNov 14, 2008
  43. Giuseppe BilottaNov 14, 2008
  44. Jakub NarebskiNov 14, 2008
  45. Sverre RabbelierNov 14, 2008
  46. Giuseppe BilottaNov 14, 2008

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.