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

Re: [PATCH v3 1/2] gitk: alter the ordering for the "Tags and heads" view

From
Paul Mackerras <paulus@ozlabs.org>
Date
Dec 11, 2016, 23:25 UTC
Message-ID
<20161211232502.GA18316@fergus.ozlabs.ibm.com>
In-Reply-To
<1459091168-46908-2-git-send-email-rappazzo@gmail.com>
On Sun, Mar 27, 2016 at 11:06:07AM -0400, Michael Rappazzo wrote:
Show 6 quoted lines
> In the "Tags and heads" view, the list of refs is globally sorted.
> Because of this, the list of local refs (heads) can be interrupted by the
> list of remote refs.  This change re-orders the view to be: local refs,
> remote refs tracked by local refs, remote refs, tags, and then other refs.
> 
> Signed-off-by: Michael Rappazzo <rappazzo@gmail.com>

This all looks OK except for the fact that the loop immediately below the code you've modified (the loop that adds or deletes lines from the actual displayed list) relies on the entries being in sorted order. With your patch the entries are no longer strictly in sorted order, so that display update loop will have to become a bit smarter too. As it is, I think that there will be cases where we will delete a lot of lines and then re-add them. If the user had scrolled the list to a particular point that was within these deleted lines, the display will scroll away from that point, which will be annoying.

Paul.
Previous: Michael RappazzoNext: Michael Rappazzo
Message 3 of 5 in “gitk: changes for the "Tags and heads" view”
  1. 0/2 gitk: changes for the "Tags and heads" viewMichael Rappazzo, Mar 27, 2016
  2. 1/2 gitk: alter the ordering for the "Tags and heads" viewMichael Rappazzo, Mar 27, 2016
  3. Paul MackerrasDec 11, 2016
  4. 2/2 gitk: add an option to enable sorting the "Tags and heads" view by ref typeMichael Rappazzo, Mar 27, 2016
  5. Mike RappazzoApr 28, 2016

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.