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:
ad10f64ebeae9e8625205b8ef468ce58e03db95b
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- 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:
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:
64592dff718689c4fb441b52d2b38e8db90089ba
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix a segfault in got diff when a root commit is passed to -c
Problem reported by Alexander Arkhipov
ok jamsek
- Commit:
11de1f0a5697c6cf6226817e41daaab98381af5b
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
regress: fix test for 'got diff' against CRLF files
ok stsp
- Commit:
870ddae51fc1a153927d6bcaf1324ae00d6b4af4
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
make diffing files which changed into dirs and vice-versa possible
Problem marked with a TODO comment by me ages ago and rediscovered by naddy@
ok op@
- 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:
e4e80ba431438f463a867e2d2d80b264faa19b07
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add xfail test for "got diff" when a commit changed a file to a directory
git diff:
diff --git a/alpha b/alpha
deleted file mode 100644
index 4a58007..0000000
--- a/alpha
+++ /dev/null
@@ -1 +0,0 @@
-alpha
diff --git a/alpha/beta b/alpha/beta
new file mode 100644
index 0000000..65b2df8
--- /dev/null
+++ b/alpha/beta
@@ -0,0 +1 @@
+beta
got diff:
diff d973bf45ce9b2b437b5d6352368e8406f9e256e2 34413d01304800f99058a1a42769e92afc534199
commit - d973bf45ce9b2b437b5d6352368e8406f9e256e2
commit + 34413d01304800f99058a1a42769e92afc534199
- Commit:
71d196c9e2bffa978977785cd8859579e78bac24
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
regress: replace typeset with printf for shell portability
The typeset shell builtin is a ksh(1) feature. It is not available
in a pure POSIX sh(1). Use printf(1) to portably perform the same
string truncation.
tweak and ok op jamsek
- Commit:
28466fcabc0e493ee2ad79cf288842307653cd28
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix diff and log diffstat tests broken in 65dedee0a2cd
I failed to update regress when changing the diffstat summary line in the
previous commit to use a singular noun after 1.
ok op@ and stsp@
- Commit:
9c677dea772784267e7ff8736e77d5b7423dd7fe
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
regress: use `local' for some variables
- Commit:
e80ef83ebe4f284343c1394110765c91ec275b53
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add regress for 'got diff -d' and minor output fix
Ensure an actual file path is displayed in the 'got diff -d -c commit path ...'
case when one of the specified paths is a deleted file. Prior to this, the
unhelpful "/dev/null" label was shown instead. Includes some copypasta fixes
noted by op.
ok stsp@ op@
- 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:
6d054bb9e38d22dc37c9141e75db6b8b9cd7ca9b
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
show file mode for new added files in work tree diffs
Make work tree diffs of local changes on disk display the file mode of new
added files like other versions of `got diff` currently do.
ok stsp@
- Commit:
3870c09167f058aec6fa7194ffdf8fef04017bc1
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
wrap overlong line in diff.sh
- Commit:
4ad4d490cb44a8933d2cd76e15289ed47be82920
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got: fix typo in argc check when diffing two blobs
We already have two arguments when diffing two blobs, so check for more than
two like we do when diffing two objects to check for invalid path args.
Includes new regress test by op for diffing two blobs.
ok stsp@ and ok plus regress test from op@
- Commit:
831297da020634f03598418e375149da41098308
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add a simple test for 'got diff' against CRLF files
- 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:
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:
47d17b68f906d072833d118bf6275881baac9a36
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
new test: `got diff' on files matched by an ignore pattern
- Commit:
3a76741959b24e02b76fdd973c68b782d2f4510d
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
regress: make test operands POSIX compliant
Since the interpreter for the regress shell scripts are using /bin/sh
this will usually imply some level of POSIX compliance (that isn't
bash-specific, for instance).
Some systems use dash as their sh shell and as such is stricter POSIX
compliance. To help -portable, make the shell test checks use a single
'=' for equality, rather than '=='.
- 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:
cc8021afc28da386d1cab85b4d74b632b90e0108
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
implement 'got diff -c' for diffing commits with optional filtering by path
Need for filtering by path sugggested by kn@
ok naddy@
- 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.