From 8d9f52a18085eeea4410e53bc6c7cbca468ddbe3 Mon Sep 17 00:00:00 2001 From: InkerBot Date: Thu, 5 Mar 2026 13:50:31 +0800 Subject: [PATCH] remove unused patch label --- bin/generate | 7 ++++--- bin/generate.ps1 | 7 ++++--- works/patch/cmd/sing-box/cmd_run.go.patch | 4 ++-- works/patch/constant/proxy.go.patch | 4 ++-- works/patch/go.mod.patch | 4 ++-- works/patch/go.sum.patch | 4 ++-- works/patch/include/registry.go.patch | 4 ++-- works/patch/option/group.go.patch | 4 ++-- works/patch/option/mysql.go.patch | 4 ++-- works/patch/protocol/group/urltest.go.patch | 4 ++-- works/patch/protocol/mysql/inbound.go.patch | 4 ++-- works/patch/protocol/mysql/outbound.go.patch | 4 ++-- works/patch/route/route.go.patch | 4 ++-- 13 files changed, 30 insertions(+), 28 deletions(-) diff --git a/bin/generate b/bin/generate index ff2cdad..3728fdb 100755 --- a/bin/generate +++ b/bin/generate @@ -33,6 +33,7 @@ is_ignored() { ;; *) case "$_name" in $_pattern) return 0 ;; esac + case "$_rel" in $_pattern/*) return 0 ;; esac ;; esac done < "$IGNORE_FILE" @@ -53,12 +54,12 @@ find "$CORE" -not -path "$CORE/.git/*" -type f | sort | while read -r dst_file; if [ -f "$src_file" ]; then if ! diff -q "$src_file" "$dst_file" > /dev/null 2>&1; then mkdir -p "$(dirname "$patch_file")" - diff -u "$src_file" "$dst_file" > "$patch_file" || true + diff -u --label "a/$rel" --label "b/$rel" "$src_file" "$dst_file" > "$patch_file" || true echo " Modified: $rel" fi else mkdir -p "$(dirname "$patch_file")" - diff -u /dev/null "$dst_file" > "$patch_file" || true + diff -u --label /dev/null --label "b/$rel" /dev/null "$dst_file" > "$patch_file" || true echo " New: $rel" fi done @@ -72,7 +73,7 @@ find "$SING_BOX" -not -path "$SING_BOX/.git/*" -type f | sort | while read -r sr if [ ! -f "$dst_file" ]; then mkdir -p "$(dirname "$patch_file")" - diff -u "$src_file" /dev/null > "$patch_file" || true + diff -u --label "a/$rel" --label /dev/null "$src_file" /dev/null > "$patch_file" || true echo " Deleted: $rel" fi done diff --git a/bin/generate.ps1 b/bin/generate.ps1 index bec7664..4be425e 100644 --- a/bin/generate.ps1 +++ b/bin/generate.ps1 @@ -29,6 +29,7 @@ function Test-Ignored { if ($RelPath -like $pattern) { return $true } } else { if ((Split-Path -Leaf $RelPath) -like $pattern) { return $true } + if ($RelPath -like "$pattern/*") { return $true } } } return $false @@ -53,11 +54,11 @@ Get-ChildItem -Path $Core -Recurse -File | Where-Object { $srcHash = (Get-FileHash $srcFile -Algorithm MD5).Hash $dstHash = (Get-FileHash $_.FullName -Algorithm MD5).Hash if ($srcHash -ne $dstHash) { - diff -u $srcFile $_.FullName | Out-File -FilePath $patchFile -Encoding utf8 + diff -u --label "a/$rel" --label "b/$rel" $srcFile $_.FullName | Out-File -FilePath $patchFile -Encoding utf8 Write-Host " Modified: $rel" } } else { - diff -u /dev/null $_.FullName | Out-File -FilePath $patchFile -Encoding utf8 + diff -u --label /dev/null --label "b/$rel" /dev/null $_.FullName | Out-File -FilePath $patchFile -Encoding utf8 Write-Host " New: $rel" } } @@ -74,7 +75,7 @@ Get-ChildItem -Path $SingBox -Recurse -File | Where-Object { if (-not (Test-Path $dstFile)) { $patchFileDir = Split-Path -Parent $patchFile if (-not (Test-Path $patchFileDir)) { New-Item -ItemType Directory -Path $patchFileDir -Force | Out-Null } - diff -u $_.FullName /dev/null | Out-File -FilePath $patchFile -Encoding utf8 + diff -u --label "a/$rel" --label /dev/null $_.FullName /dev/null | Out-File -FilePath $patchFile -Encoding utf8 Write-Host " Deleted: $rel" } } diff --git a/works/patch/cmd/sing-box/cmd_run.go.patch b/works/patch/cmd/sing-box/cmd_run.go.patch index 79c3492..96d2c8d 100644 --- a/works/patch/cmd/sing-box/cmd_run.go.patch +++ b/works/patch/cmd/sing-box/cmd_run.go.patch @@ -1,5 +1,5 @@ ---- /data/projects/arknights/omv-dijiang/works/sing-box/cmd/sing-box/cmd_run.go 2026-03-05 11:39:22.614241536 +0800 -+++ /data/projects/arknights/omv-dijiang/works/core/cmd/sing-box/cmd_run.go 2026-03-05 13:09:50.466040286 +0800 +--- a/cmd/sing-box/cmd_run.go ++++ b/cmd/sing-box/cmd_run.go @@ -3,6 +3,7 @@ import ( "context" diff --git a/works/patch/constant/proxy.go.patch b/works/patch/constant/proxy.go.patch index 54d6b96..d57313e 100644 --- a/works/patch/constant/proxy.go.patch +++ b/works/patch/constant/proxy.go.patch @@ -1,5 +1,5 @@ ---- /data/projects/arknights/omv-dijiang/works/sing-box/constant/proxy.go 2026-03-05 11:39:22.619163709 +0800 -+++ /data/projects/arknights/omv-dijiang/works/core/constant/proxy.go 2026-03-05 13:11:43.857690519 +0800 +--- a/constant/proxy.go ++++ b/constant/proxy.go @@ -31,6 +31,7 @@ TypeCCM = "ccm" TypeOCM = "ocm" diff --git a/works/patch/go.mod.patch b/works/patch/go.mod.patch index 4572871..505a34f 100644 --- a/works/patch/go.mod.patch +++ b/works/patch/go.mod.patch @@ -1,5 +1,5 @@ ---- /data/projects/arknights/omv-dijiang/works/sing-box/go.mod 2026-03-05 12:48:33.529768921 +0800 -+++ /data/projects/arknights/omv-dijiang/works/core/go.mod 2026-03-05 13:02:19.454323175 +0800 +--- a/go.mod ++++ b/go.mod @@ -11,6 +11,7 @@ github.com/database64128/tfo-go/v2 v2.3.2 github.com/go-chi/chi/v5 v5.2.5 diff --git a/works/patch/go.sum.patch b/works/patch/go.sum.patch index 860deae..b152f79 100644 --- a/works/patch/go.sum.patch +++ b/works/patch/go.sum.patch @@ -1,5 +1,5 @@ ---- /data/projects/arknights/omv-dijiang/works/sing-box/go.sum 2026-03-05 12:48:33.529768921 +0800 -+++ /data/projects/arknights/omv-dijiang/works/core/go.sum 2026-03-05 13:02:19.455279219 +0800 +--- a/go.sum ++++ b/go.sum @@ -14,6 +14,7 @@ github.com/anthropics/anthropic-sdk-go v1.26.0/go.mod h1:qUKmaW+uuPB64iy1l+4kOSvaLqPXnHTTBKH6RVZ7q5Q= github.com/anytls/sing-anytls v0.0.11 h1:w8e9Uj1oP3m4zxkyZDewPk0EcQbvVxb7Nn+rapEx4fc= diff --git a/works/patch/include/registry.go.patch b/works/patch/include/registry.go.patch index 265d42c..83cb531 100644 --- a/works/patch/include/registry.go.patch +++ b/works/patch/include/registry.go.patch @@ -1,5 +1,5 @@ ---- /data/projects/arknights/omv-dijiang/works/sing-box/include/registry.go 2026-03-05 12:48:33.529768921 +0800 -+++ /data/projects/arknights/omv-dijiang/works/core/include/registry.go 2026-03-05 13:14:06.319924033 +0800 +--- a/include/registry.go ++++ b/include/registry.go @@ -23,6 +23,7 @@ "github.com/sagernet/sing-box/protocol/group" "github.com/sagernet/sing-box/protocol/http" diff --git a/works/patch/option/group.go.patch b/works/patch/option/group.go.patch index 96b9ec3..7757b0d 100644 --- a/works/patch/option/group.go.patch +++ b/works/patch/option/group.go.patch @@ -1,5 +1,5 @@ ---- /data/projects/arknights/omv-dijiang/works/sing-box/option/group.go 2026-03-05 11:39:22.629561767 +0800 -+++ /data/projects/arknights/omv-dijiang/works/core/option/group.go 2026-03-05 13:14:27.190665236 +0800 +--- a/option/group.go ++++ b/option/group.go @@ -10,6 +10,7 @@ type URLTestOutboundOptions struct { diff --git a/works/patch/option/mysql.go.patch b/works/patch/option/mysql.go.patch index 64ffc1e..1da53d7 100644 --- a/works/patch/option/mysql.go.patch +++ b/works/patch/option/mysql.go.patch @@ -1,5 +1,5 @@ ---- /dev/null 2026-03-05 11:06:53.990718185 +0800 -+++ /data/projects/arknights/omv-dijiang/works/core/option/mysql.go 2026-03-05 13:14:38.655523071 +0800 +--- /dev/null ++++ b/option/mysql.go @@ -0,0 +1,23 @@ +// OMV +package option diff --git a/works/patch/protocol/group/urltest.go.patch b/works/patch/protocol/group/urltest.go.patch index 492d55a..889bbc9 100644 --- a/works/patch/protocol/group/urltest.go.patch +++ b/works/patch/protocol/group/urltest.go.patch @@ -1,5 +1,5 @@ ---- /data/projects/arknights/omv-dijiang/works/sing-box/protocol/group/urltest.go 2026-03-05 11:39:22.630699577 +0800 -+++ /data/projects/arknights/omv-dijiang/works/core/protocol/group/urltest.go 2026-03-05 13:17:32.300369913 +0800 +--- a/protocol/group/urltest.go ++++ b/protocol/group/urltest.go @@ -39,6 +39,7 @@ connection adapter.ConnectionManager logger log.ContextLogger diff --git a/works/patch/protocol/mysql/inbound.go.patch b/works/patch/protocol/mysql/inbound.go.patch index 078ef92..f162252 100644 --- a/works/patch/protocol/mysql/inbound.go.patch +++ b/works/patch/protocol/mysql/inbound.go.patch @@ -1,5 +1,5 @@ ---- /dev/null 2026-03-05 11:06:53.990718185 +0800 -+++ /data/projects/arknights/omv-dijiang/works/core/protocol/mysql/inbound.go 2026-03-05 13:14:59.956258942 +0800 +--- /dev/null ++++ b/protocol/mysql/inbound.go @@ -0,0 +1,255 @@ +// OMV +package mysql diff --git a/works/patch/protocol/mysql/outbound.go.patch b/works/patch/protocol/mysql/outbound.go.patch index 6438d86..30d49b4 100644 --- a/works/patch/protocol/mysql/outbound.go.patch +++ b/works/patch/protocol/mysql/outbound.go.patch @@ -1,5 +1,5 @@ ---- /dev/null 2026-03-05 11:06:53.990718185 +0800 -+++ /data/projects/arknights/omv-dijiang/works/core/protocol/mysql/outbound.go 2026-03-05 13:15:28.015911006 +0800 +--- /dev/null ++++ b/protocol/mysql/outbound.go @@ -0,0 +1,296 @@ +// OMV +package mysql diff --git a/works/patch/route/route.go.patch b/works/patch/route/route.go.patch index 3599fee..4eacc1e 100644 --- a/works/patch/route/route.go.patch +++ b/works/patch/route/route.go.patch @@ -1,5 +1,5 @@ ---- /data/projects/arknights/omv-dijiang/works/sing-box/route/route.go 2026-03-05 12:48:33.530768910 +0800 -+++ /data/projects/arknights/omv-dijiang/works/core/route/route.go 2026-03-05 13:21:58.162073283 +0800 +--- a/route/route.go ++++ b/route/route.go @@ -421,19 +421,19 @@ } else { if processInfo.ProcessPath != "" {