Commits


rename lib/sha1.c to lib/hash.c It will soon grow functions to deal with sha256 too. stsp@ agrees.


include sha2.h too where sha1.h is included In preparation for wide sha256 support; stsp@ agrees. Change done mechanically with find . -iname \*.[cy] -exec sam {} + X ,x/<sha1\.h>/i/\n#include <sha2.h>


use newly publicised diff_chunk_type() diff API To skip chunks without newly added lines. ok stsp@


have ignore patterns with trailing slashes match directories only ok jamsek


zap no longer needed forward declaration spotted by stsp@


use chunk offset to efficiently detect conflict markers Rather than skip lines, use the new diff APIs to directly seek to each chunk with newly added lines for more efficient conflict marker detection. ok stsp@


optimise parsing of modified files for conflict markers As per stsp's original design for detecting new conflicts, rather than produce a diff formatted for human consumption, parse the raw diff result to scan only newly added lines for conflict markers. While here, fix a couple related bugs in the original implementation: (1) rewind the versioned file blob so we don't end up with an empty "from" (i.e., LHS of the diff) file; and (2) force an ASCII text diff for so we don't miss conflicts in binary files. ok stsp@


add ci/he/mg/rb -C option to commit unresolved conflicts As per stsp's suggestion and building on his initial diff, add the -C option to enable creating commits with unresolved conflicts to the commit, histedit, merge, and rebase commands to allow continuing the operation despite files in conflict status. Also, only search for conflict markers in newly added lines to enable working with files already under version control that may have conflict markers embedded verbatim. lots of tweaks, improvements, and initial diff + ok stsp@


style(9): function call in initialiser patch by Mikhail


add functions to extract object ids from fileindex entries ok stsp


move comment it describes bump_base_commit_id_everywhere, not its per-entry callback bump_base_commit_id.


zap unused parameter in got_worktree_rebase_complete() ok stsp@


fix histedit -m on a commit which only changes filemode bits The commit was being miscategorized as a no-op change and dropped. Now the commit is retained and its log message is updated as expected. ok op, jamsek


got: load editor with backout/cherrypick commit log messages Create new logmsg references used to populate the editor with the log messages of backed-out and cherrypicked commits when 'got commit' is run. We use versioned path state heuristics during revert and commit commands in an effort to ensure the editor is only populated with the log messages of backed-out and/or cherrypicked commits involving paths with local changes that are being committed. This is an implementation of an initial idea and algorithm designed by stsp. inputs, improvments and ok stsp@


refactor got log -d and tog diffstat to compute diff once This eliminates the previous performance cost by making 'got log -d' and tog diff view compute the diffstat while building the diff in a temp file like we do with 'got diff -d'. Also, keep the current 'got log -d' UI as per stsp's suggestion. ok stsp@