Commits
- Commit:
59530ea7aaf19f809c3dbcec5e2d9e039a54349f
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
fcfaa6d5834dc35cb5555fcc4cb1652947bfd82d
- From:
- Josh Rickmar <jrick@zettaport.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
a807c50bd11f3ba2b72a8d02a1714efd21c2799c
- From:
- Josh Rickmar <jrick@zettaport.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
Define apply_umask earlier, without predeclaration
ok op@
- Commit:
b21ebdb07f917bc6e7026654dfbcddc6d3162383
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
2b72f32d6817b003f88452592f304c2e114617be
- From:
- James Cook <falsifian@falsifian.org>
- Via:
- Thomas Adam <thomas@xteddy.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:
fe3f264bd2e2cae213952619831d4719dd6d1f11
- From:
- James Cook <falsifian@falsifian.org>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
8ec7352a93a3c62a7786b92e4183aa7cb0b34869
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
1678610c6d5112a48cd47219c8bd4ef423d31e63
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
allow no-op merge commits to be created
Requested by James Cook
- Commit:
538aebb56b973dea6dee4dbde0ecfc4043bd6738
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
8641a33271eb0cef324fbeb4440485de8f433134
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
6f97aa8325d21f12e6cd5d21353cc11899b9c75e
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
style nits from op@, thanks!
- Commit:
f8836425010d0756365e9d64f63e3dfb517b1c6b
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make 'got revert' and 'got rm' work on non-existent directories
problem found by robert@
ok jamsek, op
- Commit:
25a102ed18cbd4e83888ece62f235f98117e0425
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
b36a977475ba5c9bfbd69cf4e15f51c3f504435a
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
9f32321217acc7223f02908d236a292f3fe3f2af
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
handle files changing into directories during 'got update'
problem found by naddy@
- Commit:
0529f8df6d2e002eb21598365157e0ada97aa85f
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
support histedit fold operations which delete a file and then add it again
problem found by naddy@
ok op@
- Commit:
4fccd2fe0ffbbc668b66abe63614470635f92f1b
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: configure: split out dependencies
Rather than assume all dependencies are required for all programs, split
them out.
This will make packaging easier, as well as splitting the code to use
subprojects.
Note that due to the use of config.h semantics, in most cases the
got_compat.h header file is now at the top of the .c file it is included
in, so that it can handle the system header inclusion properly.
- Commit:
98670ba726486c39efff220ab1e074c62023aae7
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: rework SHA detection
Simply the SHA detection by not predicating on libcrypto, but instead
checking individual header files.
- Commit:
4680f704353811c8bb6ce65eac3714d1bd200c26
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: remove sha1.h; found portably
Remove sha1.h as this is found portably across systems.
- Commit:
be288a59f42e0b5e203e2c5545bf3e042ff4b79f
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
rename lib/sha1.c to lib/hash.c
It will soon grow functions to deal with sha256 too. stsp@ agrees.
- Commit:
588a8092bc282294ee23585991e81586905a8fd4
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
47c7ee21b5f269eed3127db9d3ac7c490d1ecf0a
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
use newly publicised diff_chunk_type() diff API
To skip chunks without newly added lines.
ok stsp@
- Commit:
1b5d300f3ff325202e42e0a05b1f23f1d8b8e839
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
have ignore patterns with trailing slashes match directories only
ok jamsek
- Commit:
52ca43c16adaa0fec4ba91933386fe4970f6bacd
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
zap no longer needed forward declaration spotted by stsp@
- Commit:
450d9f6b216b7cdde9e4079e0db459d3bd2caa0d
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@