|
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
|
|
487cd7d2
|
2021-12-17T22:38:55
|
|
make tog searches start from the current position in all views
ok naddy@
|
|
5a5ede53
|
2021-12-09T15:03:48
|
|
let new 'tog log' searches start out from the currently selected commit
ok naddy tracey
|
|
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.
|
|
50617b77
|
2021-11-20T10:41:38
|
|
make tog use got_reflist_sort() instead of reloading refs while sorting them
|
|
7f66531d
|
2021-11-16T14:33:26
|
|
allow sorting references by timestamp in tog
|
|
02ffd0d5
|
2021-10-17T13:51:52
|
|
tog: add Ctrl-n/Ctrl-p shortcuts scrolling one line down/up; patch by Omar Polo
|
|
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@
|
|
9f98ca05
|
2021-09-24T19:47:15
|
|
show parent commit IDs of merge commits in the tog diff view
ok tracey
|
|
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
|
|
6062e8ea
|
2021-09-21T10:59:29
|
|
tog: document why _XOPEN_SOURCE_EXTENDED is set and don't undefine it
|
|
f3bc9f1d
|
2021-09-05T13:10:13
|
|
tog: when jumping to the bottom of the log view, go from the tail backwards
ok jasper
|
|
ea66598a
|
2021-09-03T21:41:22
|
|
tog: jump directly to first log item instead of traversing the list
ok tracey
|
|
e4526bf5
|
2021-09-03T21:40:14
|
|
tog: add support for navigating to first/last line of tree and ref views
ok stsp
|
|
4deef56f
|
2021-09-02T17:40:11
|
|
tog: add support for navigating to first/last line of blame view
ok tracey stsp
|
|
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
|
|
00f6361c
|
2021-08-30T19:12:04
|
|
remove the 'ctrl+u' shortcut in favor of just 'g' in the diff view, too
|
|
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
|
|
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@
|
|
fb280deb
|
2021-08-30T18:48:21
|
|
Allow commit loading trigged by the End/G keys to be cancelled with Backspace.
ok jasper
|
|
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
|
|
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
|
|
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.
|
|
267bb3b8
|
2021-08-01T10:14:48
|
|
plug a small memory leak in tog's show_diff_view() function
|
|
ff6cc066
|
2021-07-10T22:48:52
|
|
remove now unused variable in browse_ref_tree() I overlooked; patch by naddy
|
|
bc573f3b
|
2021-07-10T22:47:23
|
|
fix a double-free that ocurred upon exit from 'tog tree'; found by naddy
|
|
dbdddfee
|
2021-06-23T20:48:35
|
|
switch from SIMPLEQ to equivalent STAILQ macros
The singly-linked tail queue macros were added to OpenBSD 6.9 and
are more widely available on other systems.
ok stsp
|
|
1d0f4054
|
2021-06-17T08:56:43
|
|
check for close(2) error in got_repo_close() and propagate errors up
ok tracey
|
|
ec6d1a36
|
2021-03-21T18:49:57
|
|
Fix strftime(3) short buffer checks
strftime(3) returns 0 if the buffer was too short to write the
complete string (including NUL) and will never return more than
maxsize-1.
ok stsp
|
|
c0c4acc8
|
2021-01-24T18:55:17
|
|
tog: fix behaviour when 'n' is pressed before a search was started with '/'
reported by + ok naddy
|
|
56b63ca4
|
2021-01-22T11:04:47
|
|
make fclose(3) failure checks consistent; check 'fclose() == EOF' everywhere
ok millert, naddy
|
|
1fddf795
|
2021-01-20T20:33:17
|
|
fix 'tog blame' segfault upon empty input file; reported by + ok naddy
|
|
e6b8b890
|
2020-12-29T15:12:53
|
|
tog log: terminate author field at '>' in case there is no '@'
ok stsp
|
|
f193b038
|
2020-12-26T22:39:55
|
|
rename got_reflist_object_map_free to got_reflist_object_id_map_free
|
|
dae613fa
|
2020-12-26T21:40:26
|
|
remove a comment that is now misleading
|
|
d9dff0e5
|
2020-12-26T21:32:01
|
|
switch reflist to TAILQ; insert elements more efficiently for sorted input
ok naddy
|
|
87670572
|
2020-12-26T21:15:38
|
|
switch the "tog <path>" log view shortcut to the global reference list, too
ok stsp
|
|
84de9106
|
2020-12-26T20:48:43
|
|
Add a refs argument to got_repo_match_object_id(), replacing 'resolve_tags'
Make use of this where possible to avoid re-reading references from disk.
ok naddy
|
|
8924d611
|
2020-12-26T19:23:06
|
|
switch tog ref view to the global reference list as well
ok naddy
|
|
51a10b52
|
2020-12-26T19:23:06
|
|
make tog store refs and object id map in global variables instead of per view
ok naddy
|
|
d2075bf3
|
2020-12-25T21:38:17
|
|
make use of reflist object id maps in tog log and diff views
This is a partial fix for performance issues when browsing the FreeBSD
Git repo, which can easily contain more than 4000 references.
ok naddy
|
|
c156c7a4
|
2020-12-18T19:19:46
|
|
do not mix up repositories if tog's -r option is used inside a work tree
with input from and ok naddy
|
|
6059809a
|
2020-12-17T15:54:47
|
|
use size_t for loop indices to avoid signedness warnings; by emaste@freebsd
Same change as 16aeacf7088d, for subdirectories other than lib/
|
|
748d5cab
|
2020-12-14T22:15:50
|
|
replace unprintable characters with '.' before passing them to curses
Otherwise, ncurses will replace them with some printable representation
whose width we can't predict, and wunctrl() fails to return the
replacement for 0x80..0x9f.
ok stsp
|
|
f5a09613
|
2020-12-13T19:07:20
|
|
reset tog blame view's scroll position if line count shrinks too much
ok stsp
|
|
7f64f4d6
|
2020-12-10T23:42:06
|
|
accommodate newer ncurses where panel_userptr() returns a const pointer
ok stsp
|
|
826082fe
|
2020-12-10T23:35:19
|
|
use getline(3) instead of fparseln(3) in tog, for better portability
ok millert
|
|
3f670bfb
|
2020-12-10T21:59:00
|
|
fix display of lines that end in "\r\n" in tog(1)
Problem found and reported by jrick
ok naddy
|
|
9cd7cbd1
|
2020-12-07T13:13:41
|
|
deep-copy reference names in the log and tree views to prevent use-after-free
ok naddy
|
|
bf30f154
|
2020-12-07T11:47:20
|
|
miscellaneous minor style issues
|
|
ca51c541
|
2020-12-07T01:03:40
|
|
reload references when the log view is restarted with Ctrl-L
|
|
4e0d2870
|
2020-12-07T00:23:33
|
|
pass the thread_args struct to queue_commits() and trim the parameter list
ok stsp
|
|
1e1ff4ed
|
2020-12-07T00:06:56
|
|
move the tree view's selection cursor up if the terminal shrinks too much
ok naddy
|
|
8b5b8d0c
|
2020-12-06T23:07:07
|
|
move the ref view's selection cursor up if the terminal shrinks too much
bug found by naddy
ok naddy
|
|
cdfcfb03
|
2020-12-06T22:50:34
|
|
send resize events to tog child views as well as parent views
problem found by naddy
ok naddy
|
|
21355643
|
2020-12-06T22:03:32
|
|
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
|
|
486cd271
|
2020-12-06T20:12:42
|
|
plug leak of ref in cmd_tree(); found by naddy
|
|
4e97c21c
|
2020-12-06T20:12:42
|
|
make tog tree view keep track of branches/tags specified via -c
ok naddy
|
|
d8f38dc4
|
2020-12-05T22:14:04
|
|
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
|
|
5a8b5076
|
2020-12-05T16:58:37
|
|
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.
|
|
fb59748f
|
2020-12-05T16:58:37
|
|
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
|
|
2b779855
|
2020-12-05T16:19:55
|
|
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
|
|
ee756517
|
2020-12-05T13:12:32
|
|
pass reference name along when a log view is opened from a ref view
ok naddy
|
|
e78dc838
|
2020-12-04T23:27:22
|
|
replace 'focus_view' output param of view_input with 'view->focussed'
|
|
4010e238
|
2020-12-04T23:27:05
|
|
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
|
|
9970f7fc
|
2020-12-03T23:23:30
|
|
replace dead_view pointer in view_loop() with 'dying' flag in struct tog_view
ok naddy
|
|
72a9cb46
|
2020-12-03T22:13:20
|
|
tog's view_set_child() never returned an error; simplify accordingly
ok naddy
|
|
acdafe9c
|
2020-12-03T19:25:08
|
|
remove redundant "child_focussed" variable from struct tog_view
ok naddy
|
|
0bf7f153
|
2020-12-02T14:30:34
|
|
tog's log view needs to request more commits when the window expands
ok stsp
|
|
3e135950
|
2020-12-01T23:50:40
|
|
pass only the view state to scroll functions that don't need the full view
ok stsp
|
|
42a2230c
|
2020-12-01T22:54:25
|
|
reverse tree_view_visit_subtree() parameters for consistency
ok stsp
|
|
d91faf3b
|
2020-12-01T22:53:48
|
|
trim repo parameter from tree_view_walk_path(), already set by open_tree_view()
ok stsp
|
|
d86d3b18
|
2020-12-01T22:52:56
|
|
trim redundant and used parameters from draw_tree_entries()
ok stsp
|
|
4f7c3e5e
|
2020-12-01T22:52:18
|
|
trim redundant parameters from draw_blame()
ok stsp
|
|
89f1a395
|
2020-12-01T22:51:37
|
|
trim redundant parameters from draw_file()
ok stsp
|
|
8fdc79fe
|
2020-12-01T22:50:35
|
|
trim redundant and unused parameters from draw_commits() and draw_commit()
ok stsp
|
|
a5388363
|
2020-12-01T22:06:20
|
|
trim redundant and unused parameters from run_blame()
ok stsp
|
|
ffe38506
|
2020-12-01T22:05:10
|
|
trim redundant parameters from log_scroll_* and trigger_log_thread functions
Also rename scroll_{up,down} to log_scroll_{up,down}; requested by stsp.
ok stsp
|
|
694d3271
|
2020-12-01T14:53:55
|
|
trim redundant parameters from {ref,tree}_scroll_{up,down} functions
Pass only the view and scroll amount to these functions; remove
unused parameters and those that are contained in the view state.
ok stsp
|
|
34ba6917
|
2020-11-30T00:13:22
|
|
fix page-up/down in 'tog ref' view; ok naddy
|
|
fa86c4bf
|
2020-11-29T21:53:49
|
|
fix page-down/page-up scrolling in the tog tree view
problem reported by, fixed with lots of help from, and ok naddy
|
|
152c1c93
|
2020-11-29T14:21:55
|
|
tog: make it possible to open a ref view from the tree view
|
|
9a1d5146
|
2020-11-27T15:46:36
|
|
fix entry selection when moving to the parent in tog's tree view
The tree view attempts to keep the scroll position of an already
visited parent directory intact. If we start out by viewing a subtree
and then move up, the scroll position of the parent isn't actually
available since the parent tree was never nagivated by the user.
In this case tree_view_walk_path() has to fill in some values.
The only parent entry we know about in this case is the one which
was traversed to reach the child. The best we can do is to lock the
parent's scroll position such that the traversed child entry appears
at the top of the list if moving up to the parent's view. If we
then navigate down again and return, the parent's scroll position
will start to be retained and restored properly.
Analysis and draft patch by stsp, initial report and simpler fix
by yours truly.
ok stsp
|
|
e99e2d15
|
2020-11-24T22:38:29
|
|
let tog's tree and ref commands call their own usage() and not each other's
|
|
c42c9805
|
2020-11-24T22:17:55
|
|
support opening a tree view from the ref view; requested by naddy
|
|
f2f6d207
|
2020-11-24T22:17:54
|
|
trigger log thread if a log view is opened as a child view; found by naddy
|
|
a1b77402
|
2020-11-24T22:17:54
|
|
fix calls to ref_usage(); found by naddy
|
|
6458efa5
|
2020-11-24T22:17:54
|
|
initial 'tog ref' implementation
ok naddy tracey
|
|
78756c87
|
2020-11-24T21:25:40
|
|
store reflists in view state where required and get rid of reflist pointers
ok tracey naddy
|
|
3dbaef42
|
2020-11-24T15:52:41
|
|
make 'tog diff' accept reference and tag arguments; add -w and -C options
ok naddy tracey
|
|
27829c9e
|
2020-11-21T13:41:51
|
|
reset tog diff view's scroll position if diff context shrinks too much
|
|
64453f7e
|
2020-11-21T13:35:00
|
|
handle binary files in got/tog diff commands; add -a options to force text
|
|
be659d10
|
2020-11-18T17:18:23
|
|
fix type of filesize output parameter of got_object_blob_dump_to_file()
|
|
8fa913ec
|
2020-11-14T13:19:18
|
|
remove now pointless 'check_disk' parameter of got_repo_map_path()
suggested by naddy
|
|
bfd61697
|
2020-11-14T13:11:34
|
|
make tog avoid got_repo_map_path() if a work tree is available
ok naddy
|
|
276b94a1
|
2020-11-13T21:09:10
|
|
Call pthread_cond_destroy(cond) exactly once when closing a view.
This moves the pthread_cond_destroy(need_commits) from stop_log_thread(),
which can be called twice, to close_log_view(), which is called
once. It also destroys the commit_loaded condition variable, which
is created in open_log_view() but was never destroyed.
ok stsp
|
|
41605754
|
2020-11-12T18:54:38
|
|
highlight matched search terms in tog diff and tog blame views
ok naddy@
|
|
135a2da0
|
2020-11-11T00:35:23
|
|
show current/total line numbers in tog's diff view header
|
|
e54cc94a
|
2020-11-11T00:34:59
|
|
plug two memory leaks in tog's draw_file()
|
|
fe621944
|
2020-11-10T22:54:37
|
|
merge new diff implementation from the git.gameoftrees.org diff.git repository
This new diff implementation was started by Neels Hofmeyr during the u2k20
hackathon and now replaces diffreg.c code lifted from the OpenBSD base system.
The integration of this code into Got was done by me.
Got now uses the patience diff algorithm by default.
The diff.git repository will remain the primary repository for the diff code,
which already compiles and runs on other operating systems such as Linux.
Any fixes and improvements for files inherited from the diff.git repository
should be written against that repository and synced to got.git afterwards.
|