Commits
- 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:
5c23a559a76e204dc3d66ce265abeba149c1a3c2
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
guard MIN() macro against redefinition
- 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:
c8ae092d079ca1c9f5f2a7e44c73948cd55454e7
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
provide functions to parse/serialize different hashes
it abstracts over the hash type and ensures that object ids are zero'ed
before their sha1 digest is written. Needed by the incoming sha256
support.
ok stsp@
- 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:
650a3405fbd209dde33ac82b91ac6bceb15104e4
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: handle the removal of binary files
Diffs that remove binary files don't have hunks so got patch would skip
over them, treating that part of the diff as "noise".
Different programs outputs a slightly different diff for this kind of
patches, but the "Binary files ... and /dev/null differ" is usually
shown, so try to match it.
The adedd regress test covers got diff, git diff, and OpenBSD'
/usr/bin/diff. CVS diffs will currently fail because the guessed file
name will be wrong. CVS prints the file name in the Index and RCS lines
which got patch currently ignores, and shows an useless path in the
"Binary files /tmp/cvs... and /dev/null differ" line.
Discussed with and ok stsp@
- Commit:
fc2a50f28951c340fb573e7fcb0646ddf93fde8f
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
use mkstemps(3) instead of mkstemp(3) for opening named temporary files
Allows 'got commit' to use a ".diff" suffix for temporary diff files.
ok op@
- 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:
dd73a53d967417134d842edfcf254d126dde3d3d
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
handle unlink(2) errors for mergepath, tmppath, and apath in apply_patch()
ok op@
- Commit:
37e766f45c2e1cc637f4b0a0be03f125e65f8ebd
- From:
- Mark Jamsek <mark@jamsek.dev>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
ensure got patch respects x-bit perms for new files
Reported by stsp on IRC: got patch failed to set the x-bit for a new file
despite got diff recording mode 755. Parse got and git diffs for this data
and set file modes accordingly. Tweaked with hint from op.
ok stsp@
- Commit:
aaabf83f2dcb3f5cea3dc1f0227a88c7949e07d4
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
locate_hunk: set mangled earlier for clarity
suggested by stsp@; no functional change.
- Commit:
4f34ed97e0f428b8e9695ed8c18c681c339f7f02
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
allow for ignore whitespaces when matching the hunk
- Commit:
7d8bcb99cc69666c8317a8c1cadc8dc5885a7a77
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: add -c flag to apply at a specified commit
it's useful for e.g. to apply old patches that weren't generated by `got
diff' or git-diff(1) and so lacks the metadata needed for the 3-way
merge.
manpage improvements from and ok stsp@
- Commit:
219482121213057d543880d13747cebe11895075
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
simplify got_patch/apply_patch to call reverse_patch in one place once
Current code is overly complex; it looks if the diff *might* use diff3
merge to postpone reverse_patch until we know for sure. Instead, just
reverse_patch in apply_patch once we know if merge *is* used or not.
- Commit:
f4602cbd0dc693f398f68e64406240dcba6b57c0
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix `got patch -R' when using diff3 merge
`got patch -R' fails spectacularly when applied on a diff that contains
the info of the original blob for the diff3 merge machinery since it
tries to apply the reverse of the patch to the old blob.
change it to run the patch (_not_ reversed) on the old blob and then
swap the arguments to got_diff3_merge which gives us the correct reverse
merge of the diff. while here add a test case too.
reported by naddy, discussed with and ok stsp@
- Commit:
8b925c6ccd3968917253ea191906a1710c40ed2d
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: add back sys/queue.h
Now that the handling of including sys/queue.h is better, there's no
need to remove those lines from the source. Copy the location of those
original sys/queue.h lines from upstream at the same line number, so as
to avoid any conflicts in the future.
- Commit:
dab315a53201f10e04361d5f740a7e921260d60c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
use got_privsep_flush_imsg instead of reinventing it
ok stsp@
- Commit:
2140c6ec5634ddee572383944f0903ab7b0b829f
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
check for specific chars instead of using isspace(3)
Reminded by naddy and stsp; it was missing a cast to unsigned char to
prevent issues on archs with signed chars and was too broad anyway.
While here, drop an extra check immediately after.
ok stsp@
- Commit:
bb90ca7bc134f43cfda3c6f5e5d0faac9f116820
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: handle mangled whitespaces
This makes 'got patch' try to ignore whitespaces when trying to match a
hunk.
Discused with and ok stsp@
- Commit:
25a880e1b423b178bccafb2f9d92dff53fc82261
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: don't loose the x bit when merging with diff3
This fixes a regression introduced with the diff3 merge: files merged
this way have their permissions resetted after patch.
The issue is due the fact that patch_file looks at a temporary files
and not at the original "old file".
Reported by and ok stsp@
- Commit:
25ec70067dea51a3c3ffd3c5f989853d80b847f7
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
switch 'tog diff' and 'tog blame' to Myers diff for speed
Make the choice of diff algorithm configurable by diff API users.
The got and gotweb programs keep using Patience diffs which are
prettier than Myers. But tog should be as fast as possible since
it is being used interactively. If performance of Patience diff
gets improved later we can consider switching tog back over to it.
ok tracey jamsek
- Commit:
f4ae6ddb59a1edbd016ad7f0e27c2599f8966e19
- From:
- Tracey Emery <tracey@traceyemery.net>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
move got_opentempfd out of open_blob. ok stsp@
- Commit:
19dd85cbe25c418975d46e00cc13b48e26488715
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: handle git-style diffs for the 3-way merge too
tweak and ok stsp@