Commits


tog: add support for commit keywords Allow keywords as arguments to options and operands for the blame, diff, log, and tree commands. Also, return 1 when exiting tog with error rather than 0 so regress can discern success from failure. ok stsp@


use a separate .cvg meta data directory for cvg(1) work trees This prevents mixing the use of got and cvg clients in the same work tree. Avoids confusion going forward while cvg differentiates itself further. tog(1) and gotadmin(1) remain compatible with both work tree formats. These tools only read work trees to locate the corresponding repository.


tog: fix double-free in blame view error path open_diff_view() has already called view_close() on error. Patch by Josiah Frentsos.


Fix for cc1: warnings being treated as errors /home/got/src/got/tog/tog.c: In function 'draw_tree_entries': /home/got/src/got/tog/tog.c:7307: warning: comparisons like X<=3DY<=3DZ do = not have their mathematical meaning


avoid strlen in for(;;) ok jamsek, stsp


got, tog: correctly skip HEAD in build_refs_str() s[strlen(s)] == '\0' is banally always true, the intent was to not skip refs that starts with "HEAD". style nit / ok stsp@


fix refs_str memory leaks Pointed out by op@


rework how reference labels are rendered in the tog log view Draw reference labels and log message as separate strings. The previous code contained calculations mixing variables which represent an amount of wide characters in a string vs the display width of the string. We can avoid such nonsense by keeping the strings separate, though we have to be a bit careful about keeping horizontal scrolling intact. Also fix a bug where we failed to account for reference labels while setting view->maxx which made the $ key not scroll far enough. ok op@


typo: character -> characters


stop showing backup references in the tog log and diff views Backup references clutter the log view too much now that we display labels next to commit messages. They were accidentally added to the log and diffs view by me, via build_refs_str(), when support for listing backup references was added to the ref view.


fix 'tog log' display regression with long reference lists When the terminal becomes smaller horizontally we did not properly account for remaining columns and the log message of a commit could overflow into the next line, garbling the display.


relax build_refs_str to allow a NULL reflist, simplifes the callers ok stsp@


tog: fix segfault in draw_commit build_refs_str() can succeed returning a NULL string if a commit has some refs pointing to it but that were all filtered out, resulting in a NULL-deref. ok stsp@


simplify previous; avoid temporary string blind ok stsp@


show reference labels next to commit messages in tog log view requested by mpi@ ok op@