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

Re: gitk dev branch: F5 problem again

From
Paul Mackerras <paulus@samba.org>
Date
Jan 12, 2008, 10:55 UTC
Message-ID
<18312.40076.179788.88596@cargo.ozlabs.ibm.com>
In-Reply-To
<47876C69.8070604@viscovery.net>
Johannes Sixt writes:
Show 17 quoted lines
> I'm using gitk's dev branch (476ca63d Index [fnvr]highlights by id...) on
> Windows.
> 
> Start gitk like this:
> 
>    gitk somefile.c
> 
> while on a branch whose tip touches somefile.c.
> 
> Now:
> 
>    git commit --amend
> 
> Then press F5 in gitk. I get these error reports after which gitk is
> unresponsive:
> 
> can't read "children(1,)": no such element in array
Thanks.

I found the reason for the Tcl errors - an incorrect optimization in make_disporder - and I have pushed out a fix.

However, that shows up another problem, due to the way parent rewriting does (or doesn't) work when we are limiting both by revisions and by path. When you press F5 in the above scenario, you will get the new version of the commit, with its real parent shown as an open-circle commit, disconnected from the rest of the graph.

What's happening here is that to do the update, gitk first re-reads all the references, notices that the head has changed, and does a git log command like:

	git log newhead ^oldhead -- somefile.c

The git log traversal stops as soon as it finds a commit which is an ancestor of oldhead, which in this case will be oldhead's (and newhead's) real parent. Because the traversal doesn't go far enough to find another commit that touches somefile.c (which would be the fake parent that gitk would want to use for the graph), the parent rewriting doesn't happen and git log outputs the newhead commit with its real parent rather than a fake parent. Assuming the real parent doesn't touch somefile.c, it is a commit that gitk doesn't have in its graph, so it can't join newhead into the existing graph properly. I'm not sure how best to fix that. I'll have to think about it.

Paul.
Previous: Johannes Sixt
Message 2 of 2 in “gitk dev branch: F5 problem again”
  1. Johannes SixtJan 11, 2008
  2. Paul MackerrasJan 12, 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.