Download raw body.
got patch stats about conflicts and rejects
On 2023/05/11 07:34:26 +0200, Stefan Sperling <stsp@stsp.name> wrote:
> When 'got patch' sees merge conflicts it prints a final message saying
> the patch failed to apply. This behaviour seemed somewhat unclear to me
> in this particular case:
>
> $ got patch < umb3.diff
> G Makefile
> C commands.c
> G conf.c
> G ctl.c
> G externs.h
> G if.c
> G main.c
> C ppp.c
> G sqlite3.c
> A umb.c
> got: patch failed to apply
> $
>
> This left me wondering where the problem was. Other commands treat
> conflicted files as an expected outcome rather than an error.
Admittedly I haven't noticed this difference. I considered them a
failure because the presence of a conflict means that we couldn't do
what we were asked to.
> So I did not
> immediately understand that merge conflicts were the reason for the error
> message. I see why patch does this differently but I would prefer the
> following output, as implemented below.
I like it a lot.
> $ got patch < umb3.diff
> G Makefile
> C commands.c
> G conf.c
> G ctl.c
> G externs.h
> G if.c
> G main.c
> C ppp.c
> G sqlite3.c
> A umb.c
> Files with merge conflicts: 2
> got: patch failed to apply
> $
>
> ok?
ok op@
> +struct got_patch_progress_arg {
> + int did_something;
I fail to see the usefulness of `did_something'. Do you have some
further diffs that would make use of it, or is it just to keep the
same "interface" with the other progress_arg struct?
got patch stats about conflicts and rejects