Commits


make 'got status' display interrupted rebase, histedit, and merge operations When an operation is interrupted add a trailing message to status output which displays the operation and branches involved. This information will be useful when diagnosing problem reports and it helps new users with contextualizing multi-operation work tree state. ok op@


initialize and tidy up *branch_ref in got_worktree_histedit_continue()


fix use of uninitialized variable in update_blob spotted by smatch. ok millert@


fmt


plug memleak of the ignore list in 'got status' Found/reported and patch by Kyle Ackerman. ok op@


plug pathlist leak in 'got status' code path Patch by Kyle Ackerman.


actually detect modified files when checking out with -E When checking out over a pre-existing directory tree with -E, got would store the checkout timestamp in the fileindex and so not detect local edits until those files are touch(1)ed again. Instead, detect that a file already exists during checkout and don't update its {c,m}time, leaving them to zero (the epoch), so a subsequent `got status' will look at its contents. While here, change the status char for such file from ? to E, which is what the manpage actually documents. Issue reported by naddy@ ok stsp@


fix deletion of missing locally-added files If a locally added file in A status gets deleted from disk it will move into missing ! status. If the user then decides to delete the file we must remove the file index entry immediately rather than flagging the file for removal during the next commit operation. The file was never committed and lacks a base-blob and base-commit, so it cannot be removed during the next commit. As a result the commit operation was reporting a bogus "out of date" error. Found while diagnosing a related bug reported by gonzalo@ ok op@


prevent a double-free in got_worktree_commit If creating the /tmp display diff for a commitable item failed we would free the commitable item while it was already on the path list. Later on when the path list was freed in got_worktree_commit() a double-free would be detected and the program would be aborted. Found by gonzalo@ ok op@


allow modified files to be deleted during merges if content exists in the repo This makes histedit folding work when a file is modified by commit A and then deleted in commit B, with A being folded into B. Problem reported by naddy@


pass the right callback argument for check_mixed_commits


fix some non-idiomatic calls of the cancellation callback This callback could return any error code. Do not mask all such errors as cancellation.


add cancellation support to the mixed-commits checker in worktree.c


load tog's worktree base commit marker in the log thread for startup speed Walking the whole file index can take some time. Avoid delaying the perceived start-up time of tog by reading the file index in the background log thread. Problem pointed out by op@ with fixes from + ok jamsek


tog: show work tree base commit marker in log view If tog is invoked in a work tree, prefix the base commit log message summary line with a '*' if the work tree is up-to-date, and with a '~' if the base commit is not up-to-date with respect to the branch tip or it contains mixed commits. While here, plug a couple worktree leaks in cmd_ref() and cmd_tree(). ok stsp@