Re: [RFC/PATCH 0/3] teach --histogram to diff

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [RFC/PATCH 0/3] teach --histogram to diff

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:34

Shawn Pearce [off-list ref] writes:
Have you looked at a patch that differs in output between Myers and
patience, and then compared those to the histogram version?
$ git log -p v1.6.6..v1.7.6 | git patch-id >/var/tmp/md
$ git log --histogram -p v1.6.6..v1.7.6 | git patch-id >/var/tmp/hd
$ diff -u0 /var/tmp/md /var/tmp/hd |
  sed -ne '/^+/s/^+[0-9a-f][0-9a-f][0-9a-f]* //p' |
  while read commit
  do
  	git show "$commit" >/var/tmp/1
        git show --histogram "$commit" >/var/tmp/2
        interdiff /var/tmp/1 /var/tmp/2
  done

shows there is one that gives vastly different appearance, but it all
boils down to which lines to take as common, and for this particular
example neither is more readable over the other (9560808f2ef5a34d2a).

Running the above "show" with larger -U$n value shows there don't seem to
be any discrepancies between the two.

Re: [RFC/PATCH 0/3] teach --histogram to diff

From: Tay Ray Chuan <hidden>
Date: 2016-06-15 22:51:35

On Wed, Jul 13, 2011 at 1:43 AM, Junio C Hamano [off-list ref] wrote:
Shawn Pearce [off-list ref] writes:
quoted
Have you looked at a patch that differs in output between Myers and
patience, and then compared those to the histogram version?
$ git log -p v1.6.6..v1.7.6 | git patch-id >/var/tmp/md
$ git log --histogram -p v1.6.6..v1.7.6 | git patch-id >/var/tmp/hd
$ diff -u0 /var/tmp/md /var/tmp/hd |
 sed -ne '/^+/s/^+[0-9a-f][0-9a-f][0-9a-f]* //p' |
 while read commit
 do
       git show "$commit" >/var/tmp/1
       git show --histogram "$commit" >/var/tmp/2
       interdiff /var/tmp/1 /var/tmp/2
 done
Thanks for taking the time to run this.
shows there is one that gives vastly different appearance, but it all
boils down to which lines to take as common, and for this particular
example neither is more readable over the other (9560808f2ef5a34d2a).

Running the above "show" with larger -U$n value shows there don't seem to
be any discrepancies between the two.
I suspect it's due to that change being mostly a lot of additions on
the right side, without much deletions on the left.

-- 
Cheers,
Ray Chuan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help