From: fork0@t-online.de (Alex Riesen)
To: Linus Torvalds <torvalds@osdl.org>
Cc: git@vger.kernel.org, Junio C Hamano <junkio@cox.net>,
Fredrik Kuivinen <freku045@student.liu.se>
Subject: Re: CFT: merge-recursive in C
Date: Tue, 27 Jun 2006 02:17:32 +0200 [thread overview]
Message-ID: <20060627001732.GC3121@steel.home> (raw)
In-Reply-To: <Pine.LNX.4.64.0606261652350.3927@g5.osdl.org>
Linus Torvalds, Tue, Jun 27, 2006 01:54:18 +0200:
> >
> > To my deep disappointment, it didn't work out as good as I hoped: one
> > program I see most often and for longest time in the process list
> > (git-diff-tree) is a too complex thing to be put directly into
> > merge-recursive.c, so any help in this direction will be greatly
> > appreciated.
>
> Are you sure?
>
> git-diff-tree is one of the simplest git operations. We've got absolutely
> _tons_ of infrastructure in place to do it efficiently, since it's done
> all over the map (a "git-rev-list" with path limiting will do a diff-tree
> against all the commits).
>
> Some of the interfaces might be a bit non-obvious, but the diff stuff was
> some of the first ones to be libified exactly because they end up being so
> fundamental.
>
That (non-obvious) was actually the problem here. I needed a diff-tree
without any output on stdout, with "-M" (rename detection). The
precise command I gave up to implement was:
git-diff-tree -M --diff-filter=R -r -z <tree1> <tree2>
I stopped somewhere around diff_tree, being confused by show_entry.
I took a look at it again, and it seem that show_entry does not
actually "show" anything but calls diff_options->add_remove, right?
So I could define my callback, setup the options (which I certanly can
find after looking closer and longer at builtin-diff-tree.c) and wrap
diff_options with my own struct (I need to pass arguments to the
callback reentrantly: it is a recursive algorithm).
Well, it wasn't that clear (unless I missed something by a mile) last
week... But thanks for you suspicions, they actually forced me to look
at diff-tree again. Will do ... unless (I hope) someone beats me to it.
Bye!
next prev parent reply other threads:[~2006-06-27 0:17 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-26 23:38 CFT: merge-recursive in C Alex Riesen
2006-06-26 23:42 ` CFT: merge-recursive in C (test updates) Alex Riesen
2006-06-26 23:54 ` CFT: merge-recursive in C Linus Torvalds
2006-06-27 0:07 ` Linus Torvalds
2006-06-27 0:24 ` Alex Riesen
2006-06-27 0:27 ` Junio C Hamano
2006-06-27 0:17 ` Alex Riesen [this message]
2006-06-27 0:25 ` Junio C Hamano
2006-06-27 0:38 ` Alex Riesen
2006-06-27 7:28 ` Notes on diffcore API Junio C Hamano
2006-06-27 8:41 ` Alex Riesen
2006-06-27 23:33 ` Junio C Hamano
2006-06-28 7:36 ` Johannes Schindelin
2006-06-27 7:52 ` CFT: merge-recursive in C Johannes Schindelin
2006-06-27 8:58 ` Alex Riesen
2006-06-27 10:51 ` Johannes Schindelin
2006-06-27 11:53 ` Alex Riesen
2006-06-27 17:05 ` Junio C Hamano
2006-06-27 12:17 ` Alex Riesen
2006-06-27 12:43 ` Johannes Schindelin
2006-06-27 14:09 ` Alex Riesen
2006-06-28 6:37 ` Uwe Zeisberger
2006-06-28 7:32 ` Alex Riesen
2006-06-28 9:22 ` Junio C Hamano
2006-06-28 15:06 ` Christopher Faylor
2006-06-29 0:38 ` Alex Riesen
2006-06-29 0:49 ` Christopher Faylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060627001732.GC3121@steel.home \
--to=fork0@t-online.de \
--cc=freku045@student.liu.se \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=raa.lkml@gmail.com \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox