Why is it bad to commit lines with trailing whitespace into source control?

后端 未结 6 1110
渐次进展
渐次进展 2021-02-18 14:59

Why is it bad to check in lines with trailing whitespace to your source control? What kinds of problems could that cause?

6条回答
  •  时光取名叫无心
    2021-02-18 15:26

    False differences, basically. It's helpful if diffs only show "real" changes. Some diff programs will ignore whitespace, but it would be better just to avoid the dummy change in the first place.

    Of course, it also doesn't help if it makes the line wrap on a colleague's machine.

提交回复
热议问题