Commits
- Commit:
f6b8c3c2253c61e60153121cfa4da7c350787598
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix some non-idiomatic calls of the cancellation callback
This callback could return any error code. Do not mask all such
errors as cancellation.
- Commit:
cdbfe5d2325bd7ae7a197ce5e7a93fcdba9097cb
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add cancellation support to the mixed-commits checker in worktree.c
- Commit:
99301cec42290cd26b9757c17eaaab5d70781bf1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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
- Commit:
c935fd512b9937ffefdd248a3a840d0530011a1e
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
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@
- Commit:
df6221c7df42758252c508006201c3f66e6ae831
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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.
- Commit:
6a390967d72bf5e54eb669a0cef5ea548662bbbf
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
prevent useless EEXIST errors filling up the global custom error array
While checking out files, do not attempt to create every directory
that exists in the repository tree without paying consideration to
their existence on disk.
Instead, let functions which add files worry about creating any missing
parent directories. This shakes out two other bugs in broken symlink
installation code which ended up passing an absolute path to
add_dir_on_disk() and forgot to report progress in an unreachable code
path that is now getting used.
Problem reported by + ok naddy@
- Commit:
5662d61df841f27dd548625738d05c59ee54c2a4
- From:
- Josh Rickmar <jrick@zettaport.com>
- Date:
Make got_worktree_get_base_ref_name static
Nothing appears to benefit from this being non-static, and it was
missing from the public API headers as well.
ok stsp@
- Commit:
d556241a037d31a830ef830c6cb301419bb84087
- From:
- Josh Rickmar <jrick@zettaport.com>
- Date:
Define apply_umask earlier, without predeclaration
ok op@
- Commit:
b88936d3f94e26ab32d9ef5d893b39fe633c6485
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make 'got add' more forgiving about unversioned paths on the command line
When users run 'got add *' the shell may pick up already versioned files
and trigger errors about paths being in an unexpected status. Expand the
check which previously only allowed files in added status to be double-added
to cover the following status codes which are all safe to ignore: A M C m
This should make bulk additions of files a bit easier in most cases.
Problem reported by robert@
ok jamsek
- Commit:
179f9db092046395efaa1dc9e767a1ec109e1174
- From:
- James Cook <falsifian@falsifian.org>
- Date:
Implement fast-forward merges.
Split part of got_worktree_merge_prepare into a new function,
got_worktree_merge_write_refs, since that part doesn't make sense in the
fast-forward case.
ok stsp@
- Commit:
6b5246e4d4f6c6cbd079a43d14042d998fbc902f
- From:
- James Cook <falsifian@falsifian.org>
- Via:
- Stefan Sperling <stsp@stsp.name>
- Date:
make 'got merge -c' fail even if new changes only affect unrelated paths
Otherwise, 'got merge -c' can silently revert already committed changes.
Also fix GOT_ERR_MERGE_COMMIT_OUT_OF_DATE by giving it a value distinct
from GOT_ERR_MERGE_STAGED_PATHS.
Patch by James Cook
- Commit:
7f4e5320512ed5a2b28d740e0dc25cde52ba1876
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
only delete empty directories appearing in arguments to 'got rm'
Make 'got rm' keep empty directories which are not explicitly listed for
deletion. Deleting such directories is problematic in several use cases.
Avoids deleting the current working directory when the user runs "got rm *"
(pointed out by Mikhail), and avoids deletion of an empty directory "foo/"
after 'got rm foo/a foo/b' (pointed out by op@).
ok jamsek, op
- Commit:
35d2583f834a66f801dc229002d45e735882ba78
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
allow no-op merge commits to be created
Requested by James Cook
- Commit:
2b70695630ead3274d31727f6b477f3544dc9c9a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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
- Commit:
af179be739cacd6576fdf9596ac7e61b714ee367
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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@
- Commit:
46108e23186237cccae84d88785fd31d692ef535
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
style nits from op@, thanks!
- Commit:
31cf15ecf83c7e0bf2e99599b19f43fe2435d75a
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make 'got revert' and 'got rm' work on non-existent directories
problem found by robert@
ok jamsek, op
- Commit:
1b093d84c1f8f17f66aec3a337a121edcc6f77d9
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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
- Commit:
fd785a9ac70d88714b1d0533768076bcf5c9c2d2
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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)
- Commit:
07fa936579660934e2b84e747df1d21810278e11
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
handle files changing into directories during 'got update'
problem found by naddy@
- Commit:
9a298e5c10f6c68afbaca853454de2787a312c81
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
support histedit fold operations which delete a file and then add it again
problem found by naddy@
ok op@
- Commit:
53bf0b541977b66862040d4b633fb6b5d3a3c6c8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rename lib/sha1.c to lib/hash.c
It will soon grow functions to deal with sha256 too. stsp@ agrees.
- Commit:
5822e79e39a8777984e08b5d89a8c55d6aa0356d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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>
- Commit:
45e6b2f427b11e0fc760c10ee96eae3a6a5f06e7
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
use newly publicised diff_chunk_type() diff API
To skip chunks without newly added lines.
ok stsp@
- Commit:
249b637c505366856603a932c859a0baf1973d10
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
have ignore patterns with trailing slashes match directories only
ok jamsek