Commits
- Commit:
b3c57ab2fb7857f055b840d29c425370effc8f9c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
got patch: handle "\ No newline at end of file"
- Commit:
4027dbc25c21bad271f5406e382054c6095523bc
- From:
- Omar Polo <op@omarpolo.com>
- Date:
reuse apply_hunk in patch_file when creating a file
- Commit:
78f5ac2436c8d17d1dd687d69e51354707275988
- From:
- Omar Polo <op@omarpolo.com>
- 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:
46ebad135d9dc52eb84d6985393298465fa7b3ff
- From:
- Omar Polo <op@omarpolo.com>
- Date:
style
- Commit:
60aa1fa0d1bdadc23596e5d614d184525b17935c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
augment patch progress callback with hunks info; recover from errors
Augment got_patch_progress_cb by providing the hunks that were applied
with offset (or that failed) and the recoverable error encountered
during the operation (bad status, missing file, ...)
got_patch now proceeds when a file fails to be patched and exits with
GOT_ERR_PATCH_FAILED if no other errors are encountered.
While here, also add a test for the 'hunk applied with offset' case and
shrink test_patch_dont_apply and illegal_status by taking advantage that
'got patch' doesn't stop at the first error. (And add some other cases
to illegal_status too.)
discussed with and ok stsp@
- Commit:
95d683408adee5188de396567e8e9746b703d7dd
- From:
- Omar Polo <op@omarpolo.com>
- Date:
got patch: create missing directories when adding files
ok stsp@
- Commit:
2be5e1a234aeec2c4e8d6b84f0405034ed8664fa
- From:
- Omar Polo <op@omarpolo.com>
- Date:
got patch: keep permissions after patching a file
ok stsp@
- Commit:
b22138f5dbdf02a4800b44caa215bfa102ee321b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
introduce got_patch_progress_cb
This introduce a proper got_patch specific progress callback that is
invoked after processing a patch. It also drops the hackish printf in
the modified case and takes `nop' out of the struct got_patch.
ok stsp
- Commit:
899fcfdf4534887848844329dae7327bd810a432
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add a dry-run/nop mode for got patch
with lots of help from stsp for the manpage bits!
- Commit:
5b67f96efbfbf2e5a3f75f6ab91e45dd3013c77f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
got patch: require exact match when removing files
- Commit:
dbda770b9c10968769697cd1a7d6ffff596dd30b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
check file status before applying the patch
Don't allow `got patch' to delete files that are not known, or add files
that are already known and to edit files that are known, not obstructed
and without conflicts.
- Commit:
6e96b3268181f675fcf264d5e682d86a15ce426a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
refactor apply_patch to support renaming files
add two helper functions (schedule_add, schedule_del) and move the guts
of apply_patch into a new function `patch_file'. This simplifies
apply_patch and makes easier to figure out what happens.
Then, drop GOT_ERR_PATCH_PATHS_DIFFER since we allow the to rename
files.
- Commit:
b95c53dfde0b4b71d68386b5a6e362877bba1d43
- From:
- Omar Polo <op@omarpolo.com>
- Date:
apply_patch: move sanity check early in recv_patch
- Commit:
33df9995672a4f24ded6f8cd1575637e47d27921
- From:
- Omar Polo <op@omarpolo.com>
- Date:
save `pos' in locate_hunk instead of calling ftello again
ok thomas, stsp
- Commit:
d955343d21ec47956137ebce96b31ce9c0de5669
- From:
- Omar Polo <op@omarpolo.com>
- Date:
pass the callback data instead of hardcoding NULL, ok stsp
- Commit:
6f5cb1bdf76f3043ac81d413349d354738180769
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix path to the temp file used to accumulate the patch edits
ok stsp
- Commit:
e9ce266e31923cc339954b331d273d9bba543f6f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add `got patch' command for applying unified diffs