]> git.ipfire.org Git - thirdparty/git.git/commit - tree-diff.c
Fix up "git log --follow" a bit..
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Jun 2007 17:22:59 +0000 (10:22 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sat, 23 Jun 2007 06:37:21 +0000 (23:37 -0700)
commit9f38e1ef7e7992ca490b9b419f52fb4d11efb0e4
treef24f72ed5811bcd21391e75625f11e33fcaab8bc
parent750f7b668f33c9e8decbdd8141115328992d6fea
Fix up "git log --follow" a bit..

This fixes "git log --follow" to hopefully not leak memory any more, and
also cleans it up a bit to look more like some of the other functions that
use "diff_queued_diff" (by *not* using it directly as a global in the
code, but by instead just taking a pointer to the diff queue and using
that).

As to "diff_queued_diff", I think it would be better off not as a global
at all, but as being just an entry in the "struct diff_options" structure,
but that's a separate issue, and there may be some subtle reason for why
it's currently a global.

Anyway, no real changes. Instead of having a magical first entry in the
diff-queue, we now end up just keeping the diff-queue clean, and keeping
our "preferred" file pairing in an internal "choice" variable. That makes
it easy to switch the choice around when we find a better one.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tree-diff.c