Thread (13 messages) flat view 13 messages, 5 authors, 2016-06-15

Re: tig show <commit> not working anymore?

From: Jonas Fonseca <hidden>
Date: 2016-06-15 22:49:35

On Mon, Sep 20, 2010 at 00:25, Kumar Appaiah [off-list ref] wrote:
On Sun, Sep 19, 2010 at 02:46:22PM -0400, Jonas Fonseca wrote:
quoted
You fix is not that far off but to fix the second issue I had to do
change the function responsible for expanding %(commit). Anyway,
should be fixed in 0.16.1.
Unfortunately, this has introduced another (albeit minor) bug: it
breaks the tree view in some cases. For example:

git clone git://gitorious.org/taggrepper/taggrepper.git

and run tig there, and press `t'. It always gives me a blank tree.

The cause for this is that view->parent is null when the tree view
is invoked, but you merely pass !view->parent in the call to
format_argv in prepare_io.
Oops, I should really finish the tig.c split up branch and introduce a
test suite to catch stuff like this.
A simple patch to fix this is attached below, but you might have other
ideas or I might have missed something, or not added sufficient checks
for the argv vector.

As always, if I have missed something above, please do let me know.
Thanks for the patch and for reporting this. I've fixed this by using
view->prev instead of view->parent. The view->prev tracks the list of
views whereas view->parent tracks parents/child relationships in split
view mode. It was one of the things I refactored not long ago.

-- 
Jonas Fonseca
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help