From: "Marco Costalba" <mcostalba@gmail.com>
To: "Linus Torvalds" <torvalds@linux-foundation.org>
Cc: "Junio C Hamano" <junkio@cox.net>,
"Git Mailing List" <git@vger.kernel.org>
Subject: Re: Finally implement "git log --follow"
Date: Wed, 4 Jul 2007 15:21:39 +0200 [thread overview]
Message-ID: <e5bfff550707040621o1339de98o62f10fdfe4ff0650@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.0.98.0706191425240.3593@woody.linux-foundation.org>
On 6/19/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> - the commit simplification isn't done. So you cannot do "--follow"
> together with somethign that wants a contiguous history (like gitk) and
> uses "--parents".
>
> This is pretty fundamental. The commit simplification is a separate
> phase over the (non-linear!) commit space, and the "git log --follow"
> logic is really a *different* logic over the _linear_ space (namely the
> streaming "log output" space).
>
> Two totally different things, in other words. And not compatible.
>
Of course I need exactly that!
Really don't want to thrash away the nice qgit graph, also in file
histories, and at the same time I really like that '--follow' feature,
so....
I've just started to hit the wall against the scary revision.c and
friends, my goal is to find a solution (trick/hack) to get the renames
also with --parents.
First of all I have commented out:
/* Can't prune commits with rename following: the paths change.. */
// if (!revs->diffopt.follow_renames)
revs->prune_fn = try_to_simplify_commit;
So I've see that with --parents set try_to_simplify_commit() does his
job and when the processing arrives in diff_tree_sha1() it is already
pruned, so also if the check
if (opt->follow_renames && diff_might_be_rename())
is true and the following try_to_follow_renames() is called, no
alternative tree is found.
My idea, after have understood a little bit better how it works, is to
'resurrect' the pruned info before calling try_to_follow_renames().
To do this I was thinking of saving a pointer to some pruned tree
information in try_to_simplify_commit() and in case use that pointer
after in diff_tree_sha1() when needed.
Nightmares??? Perhaps, I'm just starting with this difficult piece of
code and probably (90%) I will give up before the end and very
probably (99%) all said before is just brain dead, but...anyway I have
to start from somewhere.
Marco
next prev parent reply other threads:[~2007-07-04 13:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-19 21:22 Finally implement "git log --follow" Linus Torvalds
2007-06-19 21:35 ` Linus Torvalds
2007-07-04 13:21 ` Marco Costalba [this message]
2007-06-20 6:27 ` Marco Costalba
2007-06-20 16:47 ` Linus Torvalds
2007-06-21 6:21 ` Marco Costalba
2007-06-21 15:44 ` Linus Torvalds
2007-06-21 15:55 ` Johannes Schindelin
2007-06-21 16:09 ` Linus Torvalds
2007-06-21 1:15 ` Linus Torvalds
2007-06-21 1:37 ` Junio C Hamano
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=e5bfff550707040621o1339de98o62f10fdfe4ff0650@mail.gmail.com \
--to=mcostalba@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).