Commits


portable: include support for MacOS This adds support for MacOS (Monteray onward, although should work on older MacOSes). The BSD wrapper for poll/ppoll has been lifted from the work the folks over at OpenSSH have done -- thanks!


const-ify command and option tables ok stsp


tweak error reporting due to invalid numbers Use the same idiom as in the strtonum(3) manpage which produces a more readable error message. OK kn, stsp


show rebase and histedit backups in tog ref view ok naddy


tog: clear search highlighting when reloading view Clear the search highlighting when replacing the content of a diff view ('<', '>', '[', ']', 'a', 'w') or a blame view ('b', 'p', 'B'). Previously the position would remain highlighted even if the text there had changed. ok stsp@ or a blame view


make tog searches start from the current position in all views ok naddy@


let new 'tog log' searches start out from the currently selected commit ok naddy tracey


switch tog ref view's sort order command key to "o" instead of "s" The letter "o" does not overlap with existing options of 'got ref' and is also used by mutt(1) for this purpose.


make tog use got_reflist_sort() instead of reloading refs while sorting them


allow sorting references by timestamp in tog


tog: add Ctrl-n/Ctrl-p shortcuts scrolling one line down/up; patch by Omar Polo


implement 'got diff -c' for diffing commits with optional filtering by path Need for filtering by path sugggested by kn@ ok naddy@


portable: tog: add back _XOPEN_SOURCE_EXTENDED As with OpenBSD, FreeBSD requires that _XOPEN_SOURCE_EXTENDED is defined before including <ncurses.h>, otherwise things break. On other systems (Linux), _XOPEN_SOURCE_EXTENDED is already defined, so leaving that declared unconditionally throws an error. Keep the definition, but only include it on !Linux systems. Issue reported by Christian "naddy" Weisgerber


show parent commit IDs of merge commits in the tog diff view ok tracey


tog: make blame view work Fix the thread comparison with tog's blame view.


ncurses: only look for widechar version When checking for ncurses, only check against the widechar version of the library, otherwise the code won't work correctly, despite it compiling properly. Helped by Thomas Dickey.


portable: initial Linux compilation This commit modifies the GoT main branch to be able to compile it under linux.


tog: use sched_yield(2) instead of pthread_yield(3) for portability pthread_yield(3) is an optional POSIX 2001 extension while sched_yield(2) is part of POSIX 2008. On OpenBSD they are actually equivalent, albeit not documented as such. Using sched_yield(2) helps the -portable version. Patch by Quentin Rameau


tog: document why _XOPEN_SOURCE_EXTENDED is set and don't undefine it


tog: when jumping to the bottom of the log view, go from the tail backwards ok jasper


tog: jump directly to first log item instead of traversing the list ok tracey


tog: add support for navigating to first/last line of tree and ref views ok stsp


tog: add support for navigating to first/last line of blame view ok tracey stsp


make tog block other keys except Backspace after End/G is pressed This should avoid unexpected behaviour resulting from unrelated key presses messing with the log view's state variables. Pointed out by tracey, and also discussed with jasper. ok tracey


remove the 'ctrl+u' shortcut in favor of just 'g' in the diff view, too