semantic-diff

git diff algorithm that does not rip functions apart? (language-aware diff)

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-30 10:44:11
问题 Is it possible to configure git diff to respect indentation and syntax? I am not talking about ignoring indentation and spaces, but rather to use blank lines, indentation levels and possibly brackets, to help matching the old lines to new lines. E.g. git diff often cuts through functions and their docblock, like this: class C { /** + * Goes to the bar. + */ + function bar() { + return 'bar'; + } + + /** * Gets your foo up to date. */ function foo() { When I would prefer class C { + + /** + *

Tool to parse and compare two CSS stylesheets [closed]

喜欢而已 提交于 2019-11-30 10:19:49
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Does anyone know of a good tool that can parse and compare two CSS stylesheets in order to find which selectors have different styles? I cannot use a standard diff-like tool because the two CSS files have very different layout. I need a tool that can parse and understand the CSS, then look for selectors that

git diff algorithm that does not rip functions apart? (language-aware diff)

强颜欢笑 提交于 2019-11-29 22:49:12
Is it possible to configure git diff to respect indentation and syntax? I am not talking about ignoring indentation and spaces, but rather to use blank lines, indentation levels and possibly brackets, to help matching the old lines to new lines. E.g. git diff often cuts through functions and their docblock, like this: class C { /** + * Goes to the bar. + */ + function bar() { + return 'bar'; + } + + /** * Gets your foo up to date. */ function foo() { When I would prefer class C { + + /** + * Goes to the bar. + */ + function bar() { + return 'bar'; + } /** * Gets your foo up to date. */

Tool to parse and compare two CSS stylesheets [closed]

谁说我不能喝 提交于 2019-11-29 20:15:27
Does anyone know of a good tool that can parse and compare two CSS stylesheets in order to find which selectors have different styles? I cannot use a standard diff-like tool because the two CSS files have very different layout. I need a tool that can parse and understand the CSS, then look for selectors that actually have different styles in the two stylesheets. The only tool I've found is the CSS Comparer from Alan Hart , however it gets confused when there are styles that apply to multiple selectors. Here's what I ended up doing, in case someone else has the same problem: I used CSSTidy to