tog

Branch


Log

Author Commit Date CI Message
Stefan Sperling 41e8d27d 2022-07-03T11:36:29 tog man page: provide a hint about differences between Myers and Patience
Mark Jamsek a6d37fac 2022-07-03T10:54:48 tog: add C-g/backspace key map to abort compound cmds Problem reported by stsp: 9999j would tie up tog till completed. While here, trim trailing whitespace in tog.1 and make C-g alias existing backspace abort key map for search and G in log view. ok op@ and stsp@
Mark Jamsek 49b24ee5 2022-07-03T10:26:22 tog: expand horizontal split support to all views With this, hsplits are now available to the same parent/child view combinations as vsplits. Includes OB1 log truncation fix from op@ that was reported by stsp. ok stsp@
Josh Rickmar 4d5ee956 2022-07-02T21:27:21 create and verify tags signed by SSH keys This adds a new -s flag to 'got tag' that specifies the signer identity (for example, a key file) of the tagger. The tag object will include a signature that validates each of the tag object headers and the tag message. Verifying these signed tags requires maintaining an allowed signers file which maps signer identities (i.e. the email address of the tagger) to SSH public keys. See ssh-keygen(1) for more details of the allowed signers file. After creating this file and providing the path to it in got.conf(5) using the allowed_signers option, tags may be verified using with 'got tag -V tag_name'. The return code will be non-zero if a signature fails to verify. ok stsp@
Mark Jamsek f0032ce6 2022-07-02T04:09:20 tog: remove count prefix timeout and bold output Suggested by naddy. block till non-numeric input is entered, and don't echo in bold. ok naddy@ op@ and stsp@
Mark Jamsek 76364b2d 2022-07-02T03:59:37 unconditionally set x/y pointers in view_get_split() suggested by and ok op@
Stefan Sperling 917d79a7 2022-07-01T21:15:13 make the diff algorithm used by 'tog diff' and 'tog blame' configurable ok jamsek
Stefan Sperling 4b752015 2022-06-30T21:35:28 switch 'tog diff' and 'tog blame' to Myers diff for speed Make the choice of diff algorithm configurable by diff API users. The got and gotweb programs keep using Patience diffs which are prettier than Myers. But tog should be as fast as possible since it is being used interactively. If performance of Patience diff gets improved later we can consider switching tog back over to it. ok tracey jamsek
Mark Jamsek 0dca135e 2022-06-30T11:43:19 tog: fix C-d and G log view keymaps in horizontal split Account for the border so we don't scroll offscreen, and don't unset the load_all flag till all commits have been loaded so we take the correct path in log_move_cursor_down(). ok stsp@
Stefan Sperling 24b9cfdc 2022-06-30T10:52:51 fix fullscreen / split-screen toggle in tog ok jamsek
Tracey Emery e6e73e55 2022-06-30T08:41:14 move remaining got_opentemp's out of blame. ok op@
Mark Jamsek 9b058f45 2022-06-30T05:02:23 tog: implement support for horizontal splitscreens Enable all main views to open primary child views in a horizontal split: log -> diff tree -> blame blame -> diff ref -> log Support is yet to be expanded to nested child views and key maps for manipulating split type and size. ok op@ and stsp@
Mark Jamsek b880cc75 2022-06-30T05:02:23 tog: refactor log cursor movement in prep for hsplit Simplify the log input handler by moving (page)up/down and home/end logic into helper routines as we need to perform some checks on these cases when navigating the log view in horizontal splits. ok op@ and stsp@
Stefan Sperling c71ed39a 2022-06-29T20:57:36 fix split-screen issue in tog when moving focus from child view to parent view Reported by jamsek: $ tog # term wide enough to vsplit return # open commit f # fullscreen commit tab # should go to fullscreen log, but it splits the screen fix ok jamsek
Stefan Sperling 4dd27a72 2022-06-29T15:41:58 fix recent regression in tog where split view was not restored after resize ok jamesk
Stefan Sperling f9d37699 2022-06-28T20:33:41 move got_opentempfd() out of lib/diff.c again ok tracey
Tracey Emery 1b484788 2022-06-28T18:34:57 move got_opentempfd out of blame_open ok stsp@ jrick@
Tracey Emery eb81bc23 2022-06-28T13:27:12 move got_opentempfd out of open_blob. ok stsp@
Mark Jamsek c301e4ed 2022-06-28T06:28:10 tog: echo count prefix when entering compound key maps like less(1), echo the digits as they're typed. suggested by and ok op@ stsp@
Stefan Sperling 8469d821 2022-06-25T09:25:07 always show commit or tree IDs in diff header, in order to help 'got patch' The idea is that got patch can simply look for a line such as: commit - abcde1234567... to find the merge base commit ID to show in diff3 conflict markers. got log -p now displays commit IDs in its diff header, instead ofl tree or blob IDs. ok op@
Omar Polo 336075a4 2022-06-25T09:22:02 build with -Wmissing-prototypes ok stsp@
Mark Jamsek 640cd7ff 2022-06-22T15:06:48 tog: prefix mvmt keymaps with count modifier like vi(1) Enable compound commands for all movement keymaps (e.g., hjkl, bfdu). The optional prefixed count determines how many times the movement is performed; for example, '123j' (move 123 lines down) or '4f' (scroll 4 pages down). Counts are ignored if preceding non-movement and some singular movement operations (e.g., 't', 'r', 'ret', '/', '$', 'G', 'g'). ok stsp@
Omar Polo 63ba1a3a 2022-06-21T16:52:34 fix `limit' accounting in draw_commit if the child view is fullscreen we don't need to subtract one, because no vborder is drawn. ok Mark Jamsek
Christian Weisgerber 48bb96f0 2022-06-20T20:53:20 tog: make SPACE page down in all views ok op@, Mark Jamsek
Mark Jamsek 6131ff18 2022-06-20T15:54:31 fix fullscreen view regression introduced in 0dbbbe90fd When cycling from a child view in fullscreen, the parent view is opened in a splitscreen with no border instead of fullscreen. Check the view mode when cycling between views and resize parent dimensions accordingly. ok op@
Mark Jamsek 61417565 2022-06-20T05:05:43 alias C-b/C-f to scroll page back/forward with b/f Suggested by naddy. Remap 'f'ullscreen to 'F', and blame view key maps 'b' and 'B' to 'c' and 'C', respectively, per stsp's and naddy's suggestion. While here, remove trailing whitespace. ok naddy@
Stefan Sperling f704b35c 2022-06-18T16:52:41 small grammar and accuracy fixes in a comment
Stefan Sperling 4bfe9f0a 2022-06-18T16:48:54 add missing braces around multi-line if-statement body; pointed out by op@
Stefan Sperling 364ac6fd 2022-06-18T16:47:03 take tog selection cursor position into account when searching for next match Patch by Mikhail ok op@ jamsek
Omar Polo dfee752e 2022-06-18T16:18:11 tog: reset matched and search data after C-l otherwise they point to free'd data. ok stsp@
Stefan Sperling a00719e9 2022-06-17T11:01:26 fix a segfault in tog diff The f1 tempfile must always be created. Even if the initial diff has no objects on the left side, the view can be switched to a different diff which does have objects on both sides. When that happened, tog crashed. (To reproduce: open tog in got.git, hit G, hit Enter, hit <)
Stefan Sperling dd6e31d7 2022-06-17T10:29:12 fix build of tog on sparc64 with -Werror error was tog/tog.c:636: warning: function declaration isn't a prototype
Omar Polo 4d1f6af3 2022-06-17T08:51:16 account for the vborder in draw_commit the vborder is drawn on top of the window and that can cause issues with double-width characters. Instead, account for it when computing the space available for the log message. ok stsp@
Omar Polo 0dbbbe90 2022-06-17T08:49:32 tog: resize main view drawing the child view on top of the main view when the layout is split-screen can produce some ugly glitches when double-width characters are involved. (issue found by stsp) ok stsp@
Omar Polo 4e4a9ac8 2022-06-17T08:49:32 simplify scroll_wline (now span_wline) and format_line generalize scroll_wline to start at a specified offset so that we can reuse it to simplify format_line. While here, simplify scroll_wline (now called span_wline) too. ok and improvements by stsp@
Stefan Sperling 95d136ac 2022-06-16T21:26:24 fix wrong pointer in NULL check; found by tracey
Stefan Sperling 44a87665 2022-06-16T21:22:49 fix highlighting issues in tog diff/blame search on lines with tabs
Stefan Sperling cb713507 2022-06-16T20:55:21 tog: fix crash in expand_tab while searching in diff/blame views found by op@ ok op@ tracey@
Stefan Sperling 1853e0f4 2022-06-16T20:48:35 fix diff and blame view search for horizontal scrolling with unicode ok op@
Stefan Sperling 87411fa9 2022-06-16T18:24:53 wrap overlong lines in tog.c
Stefan Sperling 4cb9d869 2022-06-16T17:17:40 fix horizontal scrolling of unicode in the blame view ok op@
Stefan Sperling 969c159c 2022-06-16T17:17:19 fix horizontal scrolling of unicode in tog diff view ok op@
Mark Jamsek f7443f66 2022-06-16T15:13:39 add missing linebreaks to demarcate sentences in tog.1 ok op@
Mark Jamsek 367ddf28 2022-06-16T14:49:57 missed style(9) fixes in previous commit ok tb@
Mark Jamsek 6e1c41ad 2022-06-16T14:41:49 plug realloc memleak and style(9) fixes in expand_tab() fixes and ok from tb@
Stefan Sperling ccda2f4d 2022-06-16T13:37:55 move horizontal line scrolling logic into format_line() for easier reuse ok op@
Stefan Sperling 0ce35b66 2022-06-16T13:36:46 fix an off-by-one in tog's draw_file() causing wrong diff output This issue caused empty lines added in diffs to be displayed without leading + in the diff view. Problem found by op@ ok op jamsek
Stefan Sperling b0dd8d27 2022-06-16T11:40:20 fix a recent regression where tog segfaults if Ctrl+l is used in the log view
Stefan Sperling 29688b02 2022-06-16T11:33:48 fix horizontal scrolling of unicode in tog log view ok jamsek
Stefan Sperling a75b3e2d 2022-06-16T08:10:33 fix horizontal scrolling bug in the blame view ok op@, jamsek
Stefan Sperling b4996bee 2022-06-16T07:04:07 show last-modified date in the "tog ref" view if the 'm' key is pressed Patch by Mark Jamsek
Stefan Sperling 145b6838 2022-06-16T07:00:28 implement horizontal scrolling for tog diff, blame, and log views Patch by Mark Jamsek
Stefan Sperling 61bce19e 2022-06-15T19:19:28 revert "clear the rest of the pack_fds pointers" There is no need to clear local variables before returning from a function. ok tracey
Tracey Emery bb1c2cf3 2022-06-15T15:37:20 clear the rest of the pack_fds pointers
Stefan Sperling 8b195234 2022-06-15T14:02:55 clear pack_fds pointer in tog's stop_blame() after closing
Stefan Sperling 74467cc8 2022-06-15T13:53:50 fix handling of pack_fds used by tog's log thread
Tracey Emery 0ae84acc 2022-06-15T13:52:20 move got_opentempfd out of got_repo_open. ok stsp@ thanks for all the help massaging this diff
Stefan Sperling 33c3719a 2022-06-15T08:50:55 re-add u/d keybindings as aliases for Ctrl-u/d, matching more(1) and less(1) patch by Mikhail
Stefan Sperling 83cc4199 2022-06-13T07:59:28 in tog, rework Ctrl+u/d to scroll by half a page, and drop d/u again This matches actual behaviour of less(1) for Ctrl+u/d, and leaves d/u free for potential future use. Suggested by naddy. Patch by Mark Jamsek
Stefan Sperling 80b7e8da 2022-06-11T19:24:51 add less(1)-style key bindings for up/down to tog; patch by Mikhail
Stefan Sperling b72706c3 2022-06-01T05:08:20 move creation of tempfiles outside of lib/diff.c ok tracey
Stefan Sperling 2497f032 2022-05-31T19:25:28 tog: override SIGTERM and SIGINT handlers to avoid ncurses cleanup() handler ok thomas
Stefan Sperling d7b5a0e8 2022-04-20T14:00:12 inline struct got_object_id in struct got_object_qid Saves us from doing a malloc/free call for every item on the list. ok op@
Stefan Sperling 392891ce 2022-04-07T13:20:47 pass an already open commit object to the blame callback ok op@
Stefan Sperling a44927cc 2022-04-07T12:57:31 stop relying on commit cache for good performance of got_object_id_by_path() Instead of internally opening and closing the same commit object over and over again, require callers to pass an open commit object in. Avoids an inherent dependency on the commit object cache for reasonable performance. ok op@
Christian Weisgerber e38d4cde 2022-03-21T13:14:13 subordinate clauses preceding the main clause are offset by a comma
Christian Weisgerber 3e166534 2022-02-16T18:32:17 const-ify command and option tables ok stsp
Omar Polo 5a20d08d 2022-02-09T14:59:46 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
Stefan Sperling cc488aa7 2022-01-23T15:35:19 show rebase and histedit backups in tog ref view ok naddy
Christian Weisgerber 67b5eae1 2021-12-27T19:01:57 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
Stefan Sperling 487cd7d2 2021-12-17T22:38:55 make tog searches start from the current position in all views ok naddy@
Stefan Sperling 5a5ede53 2021-12-09T15:03:48 let new 'tog log' searches start out from the currently selected commit ok naddy tracey
Stefan Sperling 07a065fe 2021-11-20T21:22:53 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.
Stefan Sperling 50617b77 2021-11-20T10:41:38 make tog use got_reflist_sort() instead of reloading refs while sorting them
Stefan Sperling 7f66531d 2021-11-16T14:33:26 allow sorting references by timestamp in tog
Stefan Sperling 7d69d862 2021-11-15T15:18:40 let gotadmin find the repository automatically if invoked in a work tree Move a small amount of code from worktree.c to a new file worktree_open.c, which contains everything required to open and close a work tree and inspect some of its basic parameters. This can be used by gotadmin. ok tracey
Stefan Sperling 02ffd0d5 2021-10-17T13:51:52 tog: add Ctrl-n/Ctrl-p shortcuts scrolling one line down/up; patch by Omar Polo
Stefan Sperling b343c297 2021-10-11T18:54:11 use a bloom filter to avoid pointless pack index searches
Stefan Sperling 67b631c9 2021-10-10T15:22:14 implement 'got diff -c' for diffing commits with optional filtering by path Need for filtering by path sugggested by kn@ ok naddy@
Stefan Sperling 9f98ca05 2021-09-24T19:47:15 show parent commit IDs of merge commits in the tog diff view ok tracey
Stefan Sperling 3da8ef85 2021-09-21T11:05:06 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
Stefan Sperling 6062e8ea 2021-09-21T10:59:29 tog: document why _XOPEN_SOURCE_EXTENDED is set and don't undefine it
Christian Weisgerber f3bc9f1d 2021-09-05T13:10:13 tog: when jumping to the bottom of the log view, go from the tail backwards ok jasper
Christian Weisgerber ea66598a 2021-09-03T21:41:22 tog: jump directly to first log item instead of traversing the list ok tracey
Christian Weisgerber e4526bf5 2021-09-03T21:40:14 tog: add support for navigating to first/last line of tree and ref views ok stsp
Christian Weisgerber 4deef56f 2021-09-02T17:40:11 tog: add support for navigating to first/last line of blame view ok tracey stsp
Stefan Sperling 1dd93b2a 2021-08-30T19:52:03 use more precise wording to describe why End/G commit loading can be slow
Stefan Sperling 9ebbe6e1 2021-08-30T19:48:14 Mention Backspace key in the section which introduces the End/G keys, too.
Stefan Sperling 528dedf3 2021-08-30T19:46:56 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
Jasper Lievisse Adriaanse 26f0cb24 2021-08-30T21:38:25 sync tog.1 after fb280deb with respect to the Backspace key description ok stsp
Christian Weisgerber 00f6361c 2021-08-30T19:12:04 remove the 'ctrl+u' shortcut in favor of just 'g' in the diff view, too
Stefan Sperling 75149077 2021-08-30T19:07:58 make tog ignore Ctrl+L and B while loading all commits Otherwise tog gets into a funky non-recoverable state if these keys are pressed instead of Backspace while commits are loading. bug found by + ok tracey
Stefan Sperling 27890b18 2021-08-30T18:54:51 remove the 'ctrl+u' shortcut in favour of just 'g' as alias for 'Home' Our use of ctrl+u was not consistent with vi(1) after all. Discussed with naddy, tb, and jasper on gameoftrees@
Stefan Sperling fb280deb 2021-08-30T18:48:21 Allow commit loading trigged by the End/G keys to be cancelled with Backspace. ok jasper
Jasper Lievisse Adriaanse 912a3f79 2021-08-30T17:49:33 tog: add support for navigating to first/last item of log and diff views The keybindings that we settled on are Home, Ctrl-u and g to go to the first item and End, G to go to the last. This resembles those commonly found elsewhere, eg vi/less. discussed with and ok stsp
Stefan Sperling e385fc42 2021-08-30T15:48:05 use gmtime_r(3) instead of localtime_r(3) to display time in UTC as intended Problem noticed by naddy due to failing regress tests at midnight, and then analyzed with additional help from millert. ok naddy
Stefan Sperling 93a300b2 2021-08-26T21:50:10 small man page spelling fixes
Stefan Sperling aa8b5dd0 2021-08-01T12:59:32 fix a use-after-free in get_changed_paths() in got and tog Once the parent commit is closed the tree_id1 pointer is no longer valid, but the pointer was still being used. Make a deep copy to fix this issue.
Stefan Sperling 267bb3b8 2021-08-01T10:14:48 plug a small memory leak in tog's show_diff_view() function
Stefan Sperling ff6cc066 2021-07-10T22:48:52 remove now unused variable in browse_ref_tree() I overlooked; patch by naddy