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

后端 未结 6 1096
渐次进展
渐次进展 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:33

    Because many people remove them you will have them show up as modified lines in diff tools if you don't use all the options (say a plain old cvs diff) which means people see your line for no good reason.

    In theory you could also have strings that wrap lines where whitespace would truly be bad, but... probably not your issue.

提交回复
热议问题