Commit Briefs

Christian Weisgerber

accommodate newer ncurses where panel_userptr() returns a const pointer

ok stsp


Stefan Sperling

use getline(3) instead of fparseln(3) in tog, for better portability

ok millert


Stefan Sperling

fix display of lines that end in "\r\n" in tog(1)

Problem found and reported by jrick ok naddy



Christian Weisgerber

miscellaneous minor style issues



Christian Weisgerber

pass the thread_args struct to queue_commits() and trim the parameter list

ok stsp



Stefan Sperling

move the ref view's selection cursor up if the terminal shrinks too much

bug found by naddy ok naddy


Stefan Sperling

send resize events to tog child views as well as parent views

problem found by naddy ok naddy


Stefan Sperling

fix crashes when the 'tog log' view reloads displayed data

This reimplements log view reloading (Ctrl-L), logging of a parent path (Backspace), and the toggle to show commits on branches (B). The idea is to reuse the existing log view and change its state, instead of allocating a new view with a new state and replacing the existing view. Fixes a segfault that occurs when a parent path is logged with Backspace: tog tree -r got.git -c 0.44 pick tog/tog.c 'l' Backspace -> tog will segfault The first change in this patch is a partial fix. The log thread should always check the 'quit' flag as soon as it wakes from sleep. Otherwise it could try to load more commits after waking up and before checking the 'quit' flag. It will then attempt to load commits with a NULL commit graph pointer. This partial fix by itself is not sufficient to fix the crash, since we'll now see a bus error in the main thread, instead of a NULL deref in the log thread. The remainder of the patch fixes this bus error. ok naddy



Stefan Sperling

make tog tree view keep track of branches/tags specified via -c

ok naddy


Stefan Sperling

make ^L in the tog log view stick to branches/tags selected via the -c option

Previously, the log view would remember the branch of the work tree in which tog was started, and jump back to that branch upon ^L even if a different branch was requested via -c. ok naddy


Stefan Sperling

do not recompute the displayed diff if '<' or '>' command cannot advance

Recomputing a diff can take time. Only do it if a different commit is going to be displayed.


Stefan Sperling

garbage-collect pointless main_view variable in view_loop()

This short-cut is not necessary and was buggy: The pointer was not updated even if the main view had changed. Removing this code fixes a problem on FreeBSD where pressing 'q' in a child view caused tog to exit. ok naddy


Christian Weisgerber

fix move to next/prev commit in diff view when the log view is not displayed

Original analysis and final tweak by yours truly, all the hard work of fixing the program logic by stsp. ok stsp


Stefan Sperling

pass reference name along when a log view is opened from a ref view

ok naddy



Stefan Sperling

make tog call pledge(2) directly in main() instead of per-command

All of tog's pledges are currently the same, and they must be the same because tog allows switching between available command views at run-time. ok tracey



Stefan Sperling

tog's view_set_child() never returned an error; simplify accordingly

ok naddy


Stefan Sperling

remove redundant "child_focussed" variable from struct tog_view

ok naddy


Christian Weisgerber

tog's log view needs to request more commits when the window expands

ok stsp


Christian Weisgerber

pass only the view state to scroll functions that don't need the full view

ok stsp