Commit Briefs

62d463cac1 Christian Weisgerber

indentation fixes


74cfe85e39 Stefan Sperling

use got_path_dirname() in tog's input_log_view(); avoids const dirname(3)

ok naddy


6879ba4225 Christian Weisgerber

do not treat the -h and -V flags as errors

When run with the -h or -V option, output the help or version text to stdout and exit with success (0). Only write usage and help information to stderr and exit with error (1) if there is a mistake in the command syntax. tweak and ok stsp


9814e6a376 Christian Weisgerber

prefer the BSD extension to reset getopt over the GNU one

Sadly there is no portable way to reset getopt(3). BSD: optind = 1; optreset = 1; GNU: optind = 0; ok stsp


48cae60d0a Stefan Sperling

make dangling symbolic references show up in 'got ref -l'

Storing a resolved ID for each reference list item was a bad idea. This ID cannot be resolved if a symbolic references points to a reference which does not exist. Such symrefs were skipped by got ref -l as a result. Just let users of reference lists resolve the IDs as needed.


b46c1e045a Christian Weisgerber

Print newline to clear the bottom line when tog exits.

When a curses(3)-based application exits, the cursor is positioned at the start of the bottom line, and the shell will issue the new prompt there. However, the bottom line may still contain remnants of the curses screen. This is only noticeable on terminals that do not switch to/from an alternate screen buffer. ok stsp


ae6a69782e Stefan Sperling

speed up 'tog diff' get_filestream_info() a bit

With this, 'tog diff' is able to display clang 10 commits. However, such huge diffs still take a rather long time to open. get_filestream_info() is a hack. Ideally, diff line-offset information needed by tog should be part of the result of the diff operation, rather than forcing tog to calculate line offsets during a post-processing step.



0dc7faa9e4 Stefan Sperling

fix double-free when quitting tog's diff view; found by ofree

at /home/stsp/src/got/tog/tog.c:3415 3415 free(s->line_offsets); (gdb) bt msg=0x80e2a4cd87e "chunk is already free %p") at /usr/src/lib/libc/stdlib/malloc.c:300 check=1) at /usr/src/lib/libc/stdlib/malloc.c:1070 clear=0, check=<optimized out>, argsz=0) at /usr/src/lib/libc/stdlib/malloc.c:1431 at /usr/src/lib/libc/stdlib/malloc.c:1488 at /home/stsp/src/got/tog/tog.c:3415 at /home/stsp/src/got/tog/tog.c:518 at /home/stsp/src/got/tog/tog.c:954 at /home/stsp/src/got/tog/tog.c:2728 at /home/stsp/src/got/tog/tog.c:5683 (gdb)


369eef86a8 Tracey Emery

fix some memory leaks in tog



0587e10c4c Stefan Sperling

add symlink support to 'got blame' and 'tog blame'



0208f20830 Stefan Sperling

show a list of paths changed in a commit with 'got log -P', and in tog

requested by matthieu@


79cc719fb2 Stefan Sperling

filter out "remote/*/HEAD" references in tog log view







1831ac029c Christian Weisgerber

Subtract the status line from the number of lines to page up/down in the

log view. ok stsp@



a2f4a3591f Stefan Sperling

properly free cmd_argv in tog's main() function


dfd6c25013 Stefan Sperling

fix typo in comment; found by mpi@


09b5bff804 Christian Weisgerber

switch "tog diff" repository path argument to a new -r option