Commit 9fa7ac2
authored
Switch from diff-index to diff (#9)
`diff-index`:
Compare the content and mode of the blobs found in a tree object
with the corresponding tracked files in the working tree, or with
the corresponding paths in the index.
Unlike `diff`, which only compares the content. This has the implication
(only on Linux) that if you were to recreate a file (or do something
like change a file's timestamp with `touch`, as in the test) then a
check with `diff-index` would drop us into that code path for there to
subsequently be no known files which had changed.
This behaviour came up when testing with Appraisal, which re-creates
lockfiles when run, but the content is the same.
https://stackoverflow.com/questions/24197606/whats-the-difference-between-git-diff-and-gif-diff-index
https://github.com/thoughtbot/appraisal1 parent f9da4c4 commit 9fa7ac2
2 files changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
42 | 61 | | |
43 | 62 | | |
44 | 63 | | |
45 | 64 | | |
46 | 65 | | |
| 66 | + | |
47 | 67 | | |
48 | 68 | | |
49 | 69 | | |
| |||
0 commit comments