Commit Briefs
update the base commit ID of unmodified files if the blob ID matches
This avoids having to run 'got update' after operations which run checkout_files() and where a file happens to have the same blob ID but its base commit differs from the commit we are updating to. Found while investigating a bug report by naddy@ ok op, jamsek (earlier version)
handle files changing into directories during 'got update'
problem found by naddy@
support histedit fold operations which delete a file and then add it again
problem found by naddy@ ok op@
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@
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@
move comment
it describes bump_base_commit_id_everywhere, not its per-entry callback bump_base_commit_id.
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@
got: minor refactor of got_pathlist_free() API
Accept flag parameter to optionally specify which pointers to free. This saves callers looping through the list to free pointers. ok + fix stsp@
got: expand diffstat -d option to 'got diff'
Like got log -d, add the switch to 'got diff' to display a diffstat of changes; as per stsp's suggestion, we always include diff output with the diffstat. Disabled in gotwebd (for now :) Includes tweaks from op@ ok stsp@
use mkstemps(3) instead of mkstemp(3) for opening named temporary files
Allows 'got commit' to use a ".diff" suffix for temporary diff files. ok op@