명령으로 패치를 만들려고합니다.
git diff sourcefile >/var/lib/laymab/overlay/category/ebuild/files/thepatch.patch
패치를 적용하면
$ 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
src 파일과 패치 파일 모두에 dos2unix를 적용하려고했지만 메시지가 사라지지 않았습니다 ...
UPD : --ignore-whitespace도 도움이되지 않습니다
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 : 매우 좋은 기사를 찾았습니다 : /programming//a/4425433/1709408
sed -i.bak -e 's/\r$//g' something
. dos2unix가 원하는대로 줄 끝을 혼합하여 처리한다고 생각하지 않습니다.