mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-18 07:19:07 +08:00
`git am -3` will give up frequently even in cases when patch can be auto-merged with: ``` Applying: libbpf: Unify low-level map creation APIs w/ new bpf_map_create() error: sha1 information is lacking or useless (src/libbpf.c). error: could not build fake ancestor Patch failed at 0001 libbpf: Unify low-level map creation APIs w/ new bpf_map_create() ``` But `git apply -3` in the same situation will succeed with three-way merge just fine: ``` error: patch failed: src/bpf_gen_internal.h:51 Falling back to three-way merge... Applied patch to 'src/bpf_gen_internal.h' cleanly. ``` So if git am fails, try git apply and if that succeeds, automatically `git am --continue`. If not, fallback to user actions. Signed-off-by: Andrii Nakryiko <andrii@kernel.org>