Created
November 4, 2012 03:51
-
-
Save jjb/4010082 to your computer and use it in GitHub Desktop.
diff dealing with absent vs. present newline when new code is appended
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# diff -c 1.txt 2.txt | |
*** 1.txt 2012-11-03 23:24:05.000000000 -0400 | |
--- 2.txt 2012-11-03 23:24:13.000000000 -0400 | |
*************** | |
*** 1,2 **** | |
foo | |
! bar | |
\ No newline at end of file | |
--- 1,3 ---- | |
foo | |
! bar | |
! baz | |
\ No newline at end of file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# diff -c 1-newline.txt 2-newline.txt | |
*** 1-newline.txt 2012-11-03 23:24:55.000000000 -0400 | |
--- 2-newline.txt 2012-11-03 23:25:06.000000000 -0400 | |
*************** | |
*** 1,2 **** | |
--- 1,3 ---- | |
foo | |
bar | |
+ baz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment