Commits
- Commit:
3b5e1554e5caae9735bd0e242537a2067533c4b3
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
style: remove double semicolon
- Commit:
04cdf6acc3e2bb972d4948a12406ab5d348d4760
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
check for errors from fclose() in patch_file()
- Commit:
25054c242b7401a2a20e3c8b87f0a7d61d568909
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
plug memory and fd leak in got patch
- Commit:
8ebb3daa7771365ed3667ee1d17a090556495847
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: use ints for line offsets instead of longs
ints have the advantage that their size is more likely to be the same
across the various architecture supported by OpenBSD, thus introducing
less possible differences.
INT_MAX is still (at least) a few order of magnitudes higher than the
patches we dealt with (even abnormal ones.)
suggested by stsp@
- Commit:
06227823b7e714dc42c8b3088e152be044e03b46
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
actually guarding against negative line offsets
previous commit looked at some pretty zeroes returned from calloc
instead of the actual numbers received.
- Commit:
047c926f0572281a2cb8f6a7571e204e48eff0d4
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
style; set datalen only once
- Commit:
eb35d814a71cef3007900867c20d881fcd173039
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: guard against invalid (negative) line offsets
under normal circumstances got-read-patch can't send negative line
offsets; that's not an excuse not to guard the main process from those
as well.
This makes sure we bail out early instead of trying to apply the diff.
- Commit:
9880a1ddc7243c136989370185f03cf6bdc29051
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
free patch on error
- Commit:
ca357dd90579bd69da583a03adbb873b320e7c79
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: ensure new and old paths are NUL-terminated
- Commit:
36832a8e24b87436ab3bb16483022e6e6d458699
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
refactor got_patch / got_worktree_patch_complete
let got_patch own fileindex_path and call got_worktree_patch_complete
only if got_wokrtree_patch_prepare hasn't failed.
suggested by stsp@
- Commit:
5e22b7375b034172c405da8657858663d1051eb3
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: avoid open/sync/close the fileindex over and over again
Instead of flushing the fileindex after every patch in the patchfile
just reuse the same fileindex and sync it only at the end of the patch
operation. This speeds up 'got patch' on large repositories by quite a
lot.
- Commit:
bafaf650cf9ee98df6390dc7b731fcf9546fb714
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: switch from fseek() to fseeko(), use unary minus while here
ok op
- Commit:
88c260f4a8605679ac53139d0e8f8d7617d68ea9
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: fail when reading empty hunks
- Commit:
8260acc858602e0ca6da2e1d24caf55831ee2360
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix wrong path in error message
- Commit:
eaef698f325c42c0fd48c56b391b56ce1695b9e7
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: allow to reverse a patch
add a flag to got_patch to reverse a patch before applying and the -R
flag for `got patch'.
ok stsp@
- Commit:
656c2baa8669bb412dbff580940fa9ccd8bd1f1f
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got-read-patch: preserve all \ lines
as a cheap optimization got-read-patch was sending only the "\ No
newline at end of file" lines that follows an addition (a "+" line). To
be able to reverse patches in the future got_patch needs to know about
all of these lines instead. No functional changes intended.
ok stsp@
- Commit:
72f468914d4bb4efe0732ef75572d7dc7910e295
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: resolve paths from the current working directory
this allow to apply patches from subdirectories of the work tree root.
Prodded by naddy@, ok stsp@.
- Commit:
d9db2ff90a20aac31e00f040738fd49a56b38d6b
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: allow to strip path components
Move some bits from the libexec helper to the main process so we know if
the patch was generated by git or not and finally document the automatic
stripping of a/ and b/ prefixes added by git-diff(1).
ok stsp@
- Commit:
f5f21873d3089daca895431606bb8bc769870739
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
remove trailing whitespaces
- Commit:
1f01014c15777ba6a21fef4a06ce3b181ab1c037
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: patch: remove unused code
Remove some code which was in a previous revision but isn't needed any
more. It's unclear how this crept back in as there were no conflicts
around this.
- Commit:
569e9b0bff6299ad5003698c1ca01e40da2ced14
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: remove system headers included portably
Remove direct included system headers which are included portably at
./configure time.
- Commit:
ff7f34d35c1ceac53ea203c97acadabfed48fca3
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got patch: handle "\ No newline at end of file"
- Commit:
afbf14b354450516386d5af531a554eae463fd1f
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
reuse apply_hunk in patch_file when creating a file
- Commit:
814624e72dc6ddb62ada261a323f7899caa5b4f1
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
move got_patch file status checking in worktree.c
check_file_status used got_worktree_status to check if the file was in
an allowed state, but it's wrong since the callback is not invoked on
unchanged files.
While here also fix a relate bug: unlink(newpath) is in the wrong spot
and ends up removing files even when it shouldn't, so move it early in
the got_worktree_schedule_* error handling.
Finally, update the appropriate test case. It was passing before
because got_worktree_schedule_add returned GOT_ERR_FILE_STATUS, not
because check_file_status failed.
ok stsp@
- Commit:
17d6446ae871d15954803d493cdcc3e9dd968e2c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
style