{"thread":{"id":"53024","subject":"Broken Git-diff on master","startedAt":"2020-03-18T20:41:20Z","lastAt":"2020-03-18T20:52:52Z","messageCount":2,"participants":["Son Luong Ngoc"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"393415","messageId":"20BFEDB4-738A-4DD7-9316-8DE73999C633@gmail.com","threadId":"53024","inReplyTo":null,"subject":"Broken Git-diff on master","fromName":"Son Luong Ngoc","fromEmail":"sluongng@gmail.com","sentAt":"2020-03-18T20:41:12Z","receivedAt":"2020-03-18T20:41:20Z","isPatch":false,"sender":{"key":"sluongng@gmail.com","avatar":"https://avatars.githubusercontent.com/u/26684313?v=4"},"body":"Hey folks,\n\nI am testing out the latest changes in master be8661a3286c67a5d4088f4226cbd7f8b76544b0 and observe the following\n\n> mkdir test\n> cd test\n> echo a > a\n> echo b > b\n> git diff a b | cat\ndiff --git a/a b/b\nindex 7898192..6178079 100644\n--- a/a\n+++ b/b\n@@ -1 +1 @@\n-a\n+b\n> git init\n> git diff a b | cat\n> GIT_TRACE2_PERF=1 git diff a b | cat\n21:38:36.615653 common-main.c:48             | d0 | main                     | version      |     |           |           |              | 2.26.0.rc2.27.gbe8661a328\n21:38:36.616258 common-main.c:49             | d0 | main                     | start        |     |  0.004075 |           |              | git diff a b\n21:38:36.616307 git.c:440                    | d0 | main                     | cmd_name     |     |           |           |              | diff (diff)\n21:38:36.616696 repository.c:130             | d0 | main                     | def_repo     | r1  |           |           |              | worktree:/Users/sluongngoc/work/some-dir/test\n21:38:36.617589 read-cache.c:2303            | d0 | main                     | region_enter | r1  |  0.005408 |           | index        | label:do_read_index .git/index\n21:38:36.617615 read-cache.c:2308            | d0 | main                     | region_leave | r1  |  0.005435 |  0.000027 | index        | label:do_read_index .git/index\n21:38:36.617656 git.c:674                    | d0 | main                     | exit         |     |  0.005476 |           |              | code:0\n21:38:36.617668 trace2/tr2_tgt_perf.c:213    | d0 | main                     | atexit       |     |  0.005489 |           |              | code:0\n\n> git version\ngit version 2.26.0.rc2.27.gbe8661a328\n\nI think git-diff is broken. Hope that this get address before 2.26.0 come out.\n\nCheers,\nSon Luong."},{"id":"393417","messageId":"D9C96648-26E1-46AE-AD79-123754371B30@gmail.com","threadId":"53024","inReplyTo":"20BFEDB4-738A-4DD7-9316-8DE73999C633@gmail.com","subject":"Re: Broken Git-diff on master","fromName":"Son Luong Ngoc","fromEmail":"sluongng@gmail.com","sentAt":"2020-03-18T20:52:46Z","receivedAt":"2020-03-18T20:52:52Z","isPatch":false,"sender":{"key":"sluongng@gmail.com","avatar":"https://avatars.githubusercontent.com/u/26684313?v=4"},"body":"Ah, how embarrassing, I forgot about --no-index.\nPlease ignore, sorry for the noise :(\n\n> On Mar 18, 2020, at 21:41, Son Luong Ngoc <sluongng@gmail.com> wrote:\n> \n> Hey folks,\n> \n> I am testing out the latest changes in master be8661a3286c67a5d4088f4226cbd7f8b76544b0 and observe the following\n> \n>> mkdir test\n>> cd test\n>> echo a > a\n>> echo b > b\n>> git diff a b | cat\n> diff --git a/a b/b\n> index 7898192..6178079 100644\n> --- a/a\n> +++ b/b\n> @@ -1 +1 @@\n> -a\n> +b\n>> git init\n>> git diff a b | cat\n>> GIT_TRACE2_PERF=1 git diff a b | cat\n> 21:38:36.615653 common-main.c:48             | d0 | main                     | version      |     |           |           |              | 2.26.0.rc2.27.gbe8661a328\n> 21:38:36.616258 common-main.c:49             | d0 | main                     | start        |     |  0.004075 |           |              | git diff a b\n> 21:38:36.616307 git.c:440                    | d0 | main                     | cmd_name     |     |           |           |              | diff (diff)\n> 21:38:36.616696 repository.c:130             | d0 | main                     | def_repo     | r1  |           |           |              | worktree:/Users/sluongngoc/work/some-dir/test\n> 21:38:36.617589 read-cache.c:2303            | d0 | main                     | region_enter | r1  |  0.005408 |           | index        | label:do_read_index .git/index\n> 21:38:36.617615 read-cache.c:2308            | d0 | main                     | region_leave | r1  |  0.005435 |  0.000027 | index        | label:do_read_index .git/index\n> 21:38:36.617656 git.c:674                    | d0 | main                     | exit         |     |  0.005476 |           |              | code:0\n> 21:38:36.617668 trace2/tr2_tgt_perf.c:213    | d0 | main                     | atexit       |     |  0.005489 |           |              | code:0\n> \n>> git version\n> git version 2.26.0.rc2.27.gbe8661a328\n> \n> I think git-diff is broken. Hope that this get address before 2.26.0 come out.\n> \n> Cheers,\n> Son Luong.\n\n"}]}