相关疑难解决方法(0)

`git apply --ignore-whitespace` 已损坏

根据官方git 文档

git apply
    --ignore-space-change, --ignore-whitespace
       When applying a patch, ignore changes in whitespace in context lines if necessary.
       Context lines will preserve their whitespace, and they will not undergo whitespace fixing
       regardless of the value of the --whitespace option. New lines will still be fixed, though.
Run Code Online (Sandbox Code Playgroud)

然而,基本测试表明这是一个该死的谎言。

复制步骤:

  1. somefile.txt使用以下内容 创建:
    • 第 1 行:任何您想要的文本
    • 第 2 行:任何非零数量的空格
    • 第 3 行:任何您想要的文本
  2. git add somefile.txt
  3. cp somefile.txt somefile.orig.txt
  4. 调整somefile.txt
    • 第 1 行:进行任何您想要的更改
    • 第 2 行:删除所有空格(现在将是空行)
    • 第 3 …

git patch git-apply

7
推荐指数
1
解决办法
2055
查看次数

标签 统计

git ×1

git-apply ×1

patch ×1