mirror of
https://github.com/netdata/libbpf.git
synced 2026-11-05 17:30:15 +08:00
sync: avoid brace expansion in the tree filter
git filter-branch evaluates the tree filter with /bin/sh. Where that's
dash (Debian, Ubuntu), the brace expression in the git rm command is
not expanded, so src/{Makefile,Build,test_libbpf.c,.gitignore} are
never removed. The sync then fails comparing Linux and GitHub file
lists, and synced patches could touch GitHub's own src/Makefile.
List the files explicitly.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
This commit is contained in:
1 parent
6d0328e76b
commit
e572e1cd08
1 file changed
+2
-1
@@ -86,7 +86,8 @@ for p in "${!PATH_MAP[@]}"; do
|
||||
LIBBPF_TREE_FILTER+="git mv -kf ${p} __libbpf/${PATH_MAP[${p}]} && "$'\\\n'
|
||||
done
|
||||
LIBBPF_TREE_FILTER+="find __libbpf/include/uapi/linux -type f -exec sed -i -e 's/_UAPI\(__\?LINUX\)/\1/g' -e 's@^#include <linux/compiler_types.h>@@' {} + && "$'\\\n'
|
||||
LIBBPF_TREE_FILTER+="git rm --ignore-unmatch -f __libbpf/src/{Makefile,Build,test_libbpf.c,.gitignore} >/dev/null"
|
||||
# git filter-branch evaluates the filter with /bin/sh, so no bashisms here
|
||||
LIBBPF_TREE_FILTER+="git rm --ignore-unmatch -f __libbpf/src/Makefile __libbpf/src/Build __libbpf/src/test_libbpf.c __libbpf/src/.gitignore >/dev/null"
|
||||
|
||||
cd_to()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user