小编jdu*_*unk的帖子

`git diff -w` (或 `--ignore-all-space`)已损坏

根据官方git 文档

git diff
    -w, --ignore-all-space
           Ignore whitespace when comparing lines. This ignores differences
           even if one line has whitespace where the other line has none.
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 行:请勿更改此行
  5. 使用git diff创建所谓的“忽略空白”差异:git diff -w somefile.txt > somefile.gitdiff
  6. 使用 GNU diff创建一个真正忽略空白的 diff :diff -uw somefile.orig.txt somefile.txt > …

git diff git-diff

10
推荐指数
1
解决办法
1309
查看次数

`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
查看次数

Mysql编译过程存储在哪个位置?

如何从物理位置获取编译的Mysql存储过程?

mysql stored-procedures

6
推荐指数
1
解决办法
9400
查看次数

标签 统计

git ×2

diff ×1

git-apply ×1

git-diff ×1

mysql ×1

patch ×1

stored-procedures ×1