All of lore.kernel.org
 help / color / mirror / Atom feed
* Following renames
@ 2006-03-26  1:49 Petr Baudis
  2006-03-26  2:49 ` Junio C Hamano
  2006-03-26  3:19 ` Linus Torvalds
  0 siblings, 2 replies; 41+ messages in thread
From: Petr Baudis @ 2006-03-26  1:49 UTC (permalink / raw)
  To: git

  Hi,

  so, now that I've put up with the fuzzy rename autodetection (for
now), I'd like to make cg-log auto-follow renames and I'm wondering
about the best implementation (it seems that I won't do without core
Git cooperation). I think it should be possible to implement in a way
so that it has minimal performance impact and therefore I can have it
turned on by default.

  Now I'm using the notorious

	git-rev-list listoffiles | git-diff-tree --stdin

pipeline in cg-log, and I'm wondering about the best way to add rename
detection there.

  In [1], Linus suggests a non-core solution. Unfortunately, it doesn't
fly - it requires at least two git-ls-tree calls per revision which
would bog things down awfully (to roughly half of the original speed).

  But even if git-rev-list reported disappearing files, Cogito would
have to do a lot of complicated bookkeeping in order to properly track
renames in parallel branches - for each 'head' commit at any point of
the history traversal, you need to record a separate set of interesting
files. It would also have to restart git-rev-list at any moment when a
rename happens on any of the head commits. Scales well not.

  An obvious solution would be to have git-diff-tree --follow which
updates its interesting path set based on seen renames, and now that
I've written about non-linear history, it's obvious that it's incorrect.
The other obvious way to go is then to add rename detection support to
git-rev-list, and it's less obvious that this is a dead end too - I
didn't inspect the code myself yet, but for now I trust Linus in [2]
(I didn't quite understand the argument, I guess I need to sleep on it).

  So, any thoughts about how to approach this? Either git-diff-tree
would have to be taught about the heads bookkeeping, or the git-rev-list
hurdles would have to be overcome, or we might have a
git-rev-rename-filter or something, but that feels quite redundant and
might meet with the same problems as git-rev-list.

  == References ==

  [1] Oct 21 <Pine.LNX.4.64.0510211814050.10477@g5.osdl.org>
  [2] Oct 22 <Pine.LNX.4.64.0510221251330.10477@g5.osdl.org>

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2006-03-27 22:00 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-26  1:49 Following renames Petr Baudis
2006-03-26  2:49 ` Junio C Hamano
2006-03-26  3:52   ` Jakub Narebski
2006-03-27  6:00     ` Paul Jakma
2006-03-26 10:52   ` Petr Baudis
2006-03-26 10:55     ` Petr Baudis
2006-03-26 16:08   ` Timo Hirvonen
2006-03-26 16:43     ` Linus Torvalds
2006-03-26 16:31   ` Jakub Narebski
2006-03-26 16:46     ` Linus Torvalds
2006-03-26 17:10       ` Jakub Narebski
2006-03-26 18:10         ` Linus Torvalds
2006-03-26 19:22           ` Marco Costalba
2006-03-26 22:23             ` Linus Torvalds
2006-03-27  5:47               ` Marco Costalba
2006-03-27  6:46                 ` Junio C Hamano
2006-03-27  8:07                 ` Linus Torvalds
2006-03-27 11:19                   ` Marco Costalba
2006-03-27 11:30                     ` Johannes Schindelin
2006-03-27 16:52                     ` Linus Torvalds
2006-03-27 11:55                   ` Marco Costalba
2006-03-27 12:27                     ` Andreas Ericsson
2006-03-27  6:55           ` Jakub Narebski
2006-03-27  7:40             ` David Lang
2006-03-27  7:53               ` Jakub Narebski
2006-03-26  3:19 ` Linus Torvalds
2006-03-26  7:35   ` Ryan Anderson
2006-03-26 21:09     ` Petr Baudis
2006-03-26 10:07   ` Petr Baudis
2006-03-26 10:34     ` Fredrik Kuivinen
2006-03-26 16:33     ` Linus Torvalds
2006-03-26 19:14       ` Petr Baudis
2006-03-26 20:31         ` Petr Baudis
2006-03-26 22:22         ` Linus Torvalds
2006-03-26 22:31           ` Petr Baudis
2006-03-26 22:43             ` Junio C Hamano
2006-03-26 23:10               ` Linus Torvalds
2006-03-27  7:30                 ` Junio C Hamano
2006-03-26 23:09             ` Linus Torvalds
2006-03-26 23:26         ` Petr Baudis
2006-03-27 21:59           ` Petr Baudis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.