Commits


allow no-op merge commits to be created Requested by James Cook


fix 'got commit' using a bad parent commit ID when worktree is out-of-date Problem reported by James Cook with reproduction scripts Regression test case by jamsek, as a simplified version of James' scripts fix tested + ok jamsek


when aborting rebase/histedit/merge, unlink files added by merged changes Otherwise we leave unversioned files behind in the work tree which may interfere with new attempts to rebase or merge the changes again. Problem found by + ok naddy@


style nits from op@, thanks!


make 'got revert' and 'got rm' work on non-existent directories problem found by robert@ ok jamsek, op


fix rebase/histedit -a leaving some files on the temporary branch The commands 'got rebase -a' and 'got histedit -a' were checking out files from the wrong commit. Make them check files out from the commit we are switching the work tree to, as intended. Avoids spurious merge conflicts when the work tree is later used for another rebase operation. It also makes 'got update' right after 'rebase -a' a no-op, as it should be. Problem found by naddy@ while rebasing jca's llvm15 branch ok op, jamsek earlier version


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@


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@