Commits
- Commit:
8642913bb1bf2956d44d201e77b88c2b67b7c44d
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
regress: nix 'set -A' kshism from tests
As reported by naddy, this is a non-portable Korn shell construct.
Instead, use the one argument array then make faux space-delimited string
"arrays" for the other ids; they can still be indexed with pop_idx.
improved by + ok naddy@
- Commit:
9139e0049a78ea0a4d285e4e5e4874893c0b9a09
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
implement support for keywords as got <commit> arguments
This begins enabling the use of keywords in got wherever commit ids or
references are used, with more work intended to expand support across all
such instances (e.g., branch, checkout, etc.), and add more keywords.
The keywords ":base" and ":head" can be passed to 'got {diff,log,update} -c'
commands as a substitute for the corresponding commit hash id. Keywords and
references can also be modified by appending a ':+' or ':-' and an optional
integer N to specify by first parent traversal the Nth generation descendant
or antecedent, respectively. If N is omitted, a '1' is implicitly appended.
tweaks + ok op and stsp
- 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:
8ed5d26b5e897da8368ecc8e8edf2e8587c77480
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add test case for 'got update' changing a directory into a file
- 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:
ac3cdf31e06d51b4966449da12216d3614e10576
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
regress: replace "sed -i" with ed(1) for portable in-place editing
"sed -i" is fundamentally unportable. GNU and OpenBSD sed(1) treat
the extension for the backup file as an optional argument and use
"sed -i" for no backup file. FreeBSD sed(1) treats the extension
as an obligatory argument and uses "sed -i ''" for no backup file.
There is no single syntax that works for both.
ok stsp op
- Commit:
e6f45b7279f2ab31024ae32f7ad28148bf80bee7
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
regress: replace unportable ln -h option with rm && ln
ok stsp
- Commit:
7b074ee1ba7f2a0f63c30e6fee0f3715f0c3d2ed
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add xfail test for "got update" replacing a file with a directory
ok stsp
- Commit:
97631c52360677d26b8c8ea52ca3f3279704e88b
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
regress: git_rm will cd into the test repo by itself
- Commit:
8de9d8ad91a0d3d87e435ec6f33528f9a807f71f
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
be94c03278021d1c6dbcd4a9b53014432f48ae4a
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
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@
- Commit:
a2c162ebaea11f9bd1d46c4cdf5b8f488ebaf58f
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
respect umask when creating or changing files and directories
This behaviour is already documented in got-worktree(5) but wasn't
actually implemented.
ok stsp@
- Commit:
bf3ab20628c2f092c3ddea4787a49621986abd07
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix regression test failures with Git 3.30.5 / 2.38.1 or later installed
The fix for CVE-2022-39253 in Git made our regression tests fail since
creating submodules from local clones is no longer allowed by default.
Add an override to our invocations of "git submodule add", the same
which was added to Git's regression test suite as part of their fix.
This CVE doesn't otherwise affect us. We do not implement submodules.
Our use of them in regression tests exists only to ensure that Got does not
freak out when it sees one. Precisely because automated support for nested
repositories and/or working copies (as in Git Submodules, or Subversion
Externals, etc.) have been an endless source of security problems in
other systems.
sudden test failures pointed out by naddy@
- Commit:
9b4458b41088db703d890881c32dfd242efce4df
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
always show commit or tree IDs in diff header, in order to help 'got patch'
The idea is that got patch can simply look for a line such as:
commit - abcde1234567...
to find the merge base commit ID to show in diff3 conflict markers.
got log -p now displays commit IDs in its diff header, instead ofl
tree or blob IDs.
ok op@
- Commit:
2185070209cdb8294a76bf6bc8695326dd4701fc
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
set `ret' in a few places where it was forgotten; ok tracey@
- Commit:
fc414659b454e49203f7ba02fb9866da42ffb4d0
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
use test(1) -eq and -ne to compare integers, and reduce quoting
This brings the rest of the regression test scripts in line with
patch.sh.
- Commit:
24f136e0f955e179395f9d081b45fbea32f02325
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
preverse binary files during updates and merges
- Commit:
f1417e9f1c817d4e11dba207cf39ae12ffda2138
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
sort and de-duplicate work tree path command line arguments
This is important in cases like 'got diff file.txt file.txt' which
should only show the diff for file.txt once.
suggested by kn@
- Commit:
c206b220ed859d6c8bd3e061fb2668e0caa68d5c
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
regress: provide a sed wrapper
In order to portably handle the difference in how 'sed -i' works between
*BSD and Linux, provide a wrapper to invoke the underying system sed(1)
based on which OSTYPE is in use.
- Commit:
fa37079fce1f4b2e6b73ab317c1840a860b56eb4
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
regress: use gdate/gln if on *BSD
To minimise the amount of churn between the difference in date(1)
and ln(n) semantics, use gdate and gln from coreutils.
- Commit:
e6f4ba3109814ba43d3a9e9c9c9dc55c40149dbc
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix 'got update' of an added + obstructed file
When 'got update' tried to add a new file to the work tree and this
file was obstructed by, say, a directory on disk, the update failed:
$ got update
? new
got: new: Is a directory
$
And the work tree was not updated.
With this commit this situation is properly detected as an obstruction
and the update succeeds:
$ got update
~ new
Updated to refs/heads/master: c1f85b4938dc4c668a88f13df2b98a520fc077cc
File paths obstructed by a non-regular file: 1
$
Extend a corresponding test case to cover this issue.
ok tracey
- Commit:
dd6165e49c3235f6e7c8bf7e2c1f9635009f08a4
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas.adam@smoothwall.net>
- Date:
regress: fix test failures using ln(1)
GNU ln uses -T instead of -h for no-target-directory.
OK thomas.adam
- Commit:
4f3c844beaeb6a0b30565833e0481b8de9a5106e
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make 'got update' display the worktree's branch name upon success
ok tracey
- Commit:
67c65ed764e7542fc784be76cd535c4073c813c3
- From:
- Tracey Emery <tracey@traceyemery.net>
- Date:
add tests for checkout -q, update -q, and status -S. ok stsp
- Commit:
2c41dce749de6cee00ec5b611d0509f9e45f0fd7
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
allow obstructed files skipped by 'got update' to be updated again