Tag: semantic diff

不区分function的git diffalgorithm? (语言意识差异)

可以configurationgit diff来尊重缩进和语法吗? 我不是在谈论忽略缩进和空格,而是使用空行,缩进级别和可能的括号来帮助将旧行匹配到新行。 例如,git diff通常会切换函数和docblock,如下所示: class C { /** + * Goes to the bar. + */ + function bar() { + return 'bar'; + } + + /** * Gets your foo up to date. */ function foo() { 当我更喜欢 class C { + + /** + * Goes to the bar. + */ […]