git diff
Saída de contraste :
diff --git a/indent.rb b/indent.rb
index 81595d9..08ec43c 100644
--- a/indent.rb
+++ b/indent.rb
@@ -1,7 +1,9 @@
-def fn
- # big complicated
- # function body
- # ...
- # ...
+def fn(really_do_it)
+ if really_do_it
+ # big complicated
+ # function body
+ # ...
+ # ...
+ end
end
Com git diff -b
saída:
diff --git a/indent.rb b/indent.rb
index 81595d9..08ec43c 100644
--- a/indent.rb
+++ b/indent.rb
@@ -1,7 +1,9 @@
-def fn
+def fn(really_do_it)
+ if really_do_it
# big complicated
# function body
# ...
# ...
+ end
end
(Ainda não sei como só descobri isso agora …)