Commits
- Commit:
9c49c6c0edf6a702aa6b70f8327de7c53b2a42ad
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
prevent tog segfault upon unexpected object type in ref list view
If an unexpected object type is found while resolving a reference
in the ref view, have tog exit with an "unknown object type" error
instead of crashing.
Found while playing with a repo which contains tags that tag tags.
- Commit:
64d30f49d7bb122247fc1ab03df40670ff210369
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
set pointers to NULL after freeing in tog's view_close()
- Commit:
09d38fee11b9a19a2baef6995366389723745baa
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
tog: show shortened "id1 -> id2" as path in diffstat when diffing blobs
This matches the output of "got diff -d".
ok jamsek
- Commit:
78a2ad6b7632ff7b206518772a6aa2f1fcfa7f40
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: expand diffstat to all diff views
Suggested by naddy: display diffstat in diff views of arbitrary commits.
For the sake of consistency, show it in tree and blob diffs now too.
Adjust and grow regress to cover the change.
ok stsp@
- Commit:
bc7dcd6603946972172d2e08412488029d34759a
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog diff 'p' keymap: show id prefix in diff filename
This helps identify diffs when several have been written.
Suggested by stsp on IRC.
ok stsp@
- Commit:
e11883f02b06fcd5d68da0aa0b781f93b3e94568
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: add diff view 'p' keymap to write the diff to file
Write the current diff view to a temporary patch file in /tmp and report
the pathname to the status line.
discussed with naddy
input and ok stsp@
- Commit:
e5eb6d2d0fae51188a4650e49d0ad3866d3f3fb5
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
zap redundant free
This pointer is owned by the caller and is freed in error paths via
close_diff_view()
ok stsp@
- Commit:
e2e5e9c1caad82813b3d188ca38f274bee502b7d
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
use local temporary convenience pointer missed in 28c5a8280b
ok stsp@
- Commit:
28c5a8280b8c50cc924b403e4153e024c0b10baa
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
add tog log 'm' keymap to mark arbitrary commits to diff
Enable "marking" an arbitrary commit in the log view to open a diff view
showing the changes between it and the next commit selected with 'return'.
Entering 'm' on an already marked commit unmarks it.
input from and ok stsp@
- Commit:
f300c925ecb7ebc05b5b65b00e0c845cbd4965d5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
backout 4f73a04b63 "Remove unnecessary sched_yield(2)"
this made tog regress hang in an infinite loop, reported by naddy.
Remove unnecessary sched_yield(2).
Re-applies commit 6b8a2b8fcd99c4365b1aa9513c0f0149beac2491 which was
reverted in commit 82954512f323c8a2d4f89d51be1e6b0f707b6c3a because
at the time the change broke the 'search' feature.
Quick testing suggests search is now working fine, so let's try again.
- Commit:
c26e21eef791002a56bc9c626f5a94cba4165d09
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: squish horizontal scroll bug that draws trailing '.'
When calling span_wline() to compute the number of columns to skip on a string
with a column length less than or equal to the number of columns we want to
skip (i.e., that the user has scrolled right), the call to wcwidth(3) returns
-1 for a '\n', which we replace with a '.' character. Trim trailing newlines
before calling span_wline().
ok op@
- Commit:
760da9be871e5ddb0810ad8d09b20016fcafa770
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
fix diff view J keymap to diff the next commit in the log
When the last visible commit in the log view is selected while in a log/diff
horizontal split, and fullscreen is then toggled in the diff view, the user
cannot scroll to the next commit with the diff view J keymap due to a bad
predicate guarding a clamp to prevent scrolling off-screen that should only
be applied when in the horizontally split log view and not when scrolling
from the diff view. The fix also reveals an off-by-one that's only applicable
in the hsplit case in the subsequent commit loading logic that also breaks J
when attempting to scroll beyond the last loaded commit.
New regress added to cover these cases.
ok op@ (caveated that he's unsure exactly why the OB1 fix works)
- Commit:
4f73a04b6396087a85fe0bc181e1e04b0c0d674f
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
Remove unnecessary sched_yield(2).
Re-applies commit 6b8a2b8fcd99c4365b1aa9513c0f0149beac2491 which was
reverted in commit 82954512f323c8a2d4f89d51be1e6b0f707b6c3a because
at the time the change broke the 'search' feature.
Quick testing suggests search is now working fine, so let's try again.
- Commit:
283939fb8245f1600227fa1cde3c5623666fac8d
- From:
- Lucas Gabriel Vuotto <lucas@sexy.is>
- Via:
- Omar Polo <op@omarpolo.com>
- Date:
replace date, strftime %G-%m-%d with %F
Use the more predictable %F, aka %Y-%m-%d, instead of %G-%m-%d. %G
follows the definition of ISO-8601 week-based year, which is weird.
In particular, 2024 is one of such years with weird behaviour:
$ date -jf %Y-%m-%d +"%F %G-%m-%d" 2024-12-30
2024-12-30 2025-12-30
Diff from Lucas Gabriel Vuotto (thanks!); stsp agrees
- Commit:
98297eed5b9082b66f6397a0921c8d90df72cca1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
rename got_commit_graph_iter_start() to got_commit_graph_bfsort()
This function begins a breadth-first traversal. The new name makes
it easier to distinguish from got_commit_graph_toposort().
- Commit:
65d7451409bf603e3c302b7d0ce999f7ce542508
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
ensure tmp file is closed and fix UB in diff error path
As reported by op, we fail to close a tmp file in some diff failure case. Also
spotted by op and stsp, set FILE pointer to NULL after fclose(3) failure so we
no longer attempt to access the stream or close it again in close_diff_view().
fix plus ok op@ and stsp@
- Commit:
9fe0899b90726c84f4aa0837580eccef58e48631
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
plug leak of commit object in 'tog diff' error path
tweaked by + ok op@
- Commit:
80f4db877f17489d336a0a87b79e2fed2bf1567f
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: plug object id leak in diff view; ok op@
- Commit:
6d6b14e9865b826da892895d09519588459b67ad
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: plug commit object leak in 'tog tree'; ok op@
- Commit:
9093afe0fa5f6e52a64c1b4bfbf369d0a1ac3dfd
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: plug colors memleak in log view; ok op@
- Commit:
39ccd01728db4a4cd45f03fdb4e8bfe7a8c16b0a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make 'tog diff' release the work tree lock earlier
Avoids 'work tree is already locked' errors from got commands while
the 'tog diff' command remains running.
- Commit:
2e2450f50c41d866e20dec2ad4d9eafa3c19f2ba
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: make patience the default diff algorithm
As discussed on IRC. It makes nicer diffs and the performance hit should
only be noticeable with the odd large diff. It might also be a motivator
in trying to speed up the patience implementation.
ok stsp@
- Commit:
f641a70732592218d24ad7e4033aa717a7572816
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: add basic regress for log limit and log search
This required minor changes to tog.c to teach tog the new test instructions
and feed it search terms when driven by the harness. More is needed for these
features but this provides some basic coverage for the & and / log keymaps.
ok stsp
- Commit:
c15576d6457ced2ac30752e2823f0ec6d744a696
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
plug line_offsets leak in tog blame view; ok op@
- Commit:
e31c89e9729d162ca5e015962b45923263d1eee1
- From:
- Mikhail <mp39590@gmail.com>
- Via:
- Mark Jamsek <mark@jamsek.dev>
- Date:
tog: don't show the base commit marker in limit view
The limit commit queue is invariably filled with different commits to the
queue containing all commits, so the index of the work tree's base commit in
the real queue corresponds to a different commit in the limit queue. As such,
the marker is drawn on an incorrect commit. Rather than fix this to draw the
marker on the correct commit if it happens to be in the limit queue, don't
draw the marker at all in limit view. As pointed out by Mikhail on the list,
this information is not wanted in the limit view. Patch and report by Mikhail.