Sto cercando di creare una patch con il comando
git diff sourcefile >/var/lib/laymab/overlay/category/ebuild/files/thepatch.patch
quando applico la patch, mi dà
$ patch -v
GNU patch 2.7.5
$ /usr/bin/patch -p1 </var/lib/laymab/overlay/category/ebuild/files/thepatch.patch
patching file sourcefile
Hunk #1 FAILED at 1 (different line endings).
Hunk #2 FAILED at 23 (different line endings).
Hunk #3 FAILED at 47 (different line endings).
Hunk #4 FAILED at 65 (different line endings).
Hunk #5 FAILED at 361 (different line endings).
5 out of 5 hunks FAILED -- saving rejects to file sourcefile.rej
Ho provato ad applicare dos2unix sia al file src che al file patch, ma il messaggio non è andato ...
UPD: --ignore-whitespace non aiuta anche
PATCH COMMAND: patch -p1 -g0 -E --no-backup-if-mismatch --ignore-whitespace --dry-run -f < '/var/lib/layman/dotnet/dev-dotnet/slntools/files/remove-wix-project-from-sln-file-v2.patch'
=====================================================
checking file Main/SLNTools.sln
Hunk #1 FAILED at 14 (different line endings).
Hunk #2 FAILED at 49 (different line endings).
Hunk #3 FAILED at 69 (different line endings).
Hunk #4 FAILED at 102 (different line endings).
4 out of 4 hunks FAILED
UPD: trovato un ottimo articolo: /programming//a/4425433/1709408
sed -i.bak -e 's/\r$//g' something
. Non credo che dos2unix gestisca i fine linea misti in modo aggressivo come si potrebbe desiderare.