Re: Finding all commits which modify a file
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 24, 2012, 01:40 UTC
- Message-ID
- <7vipk16fp6.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <CA+gHt1DxY42W9g+gJQTFrXuXBN-Jny+Jg60gKssdftZ5wxu91A@mail.gmail.com>
Santi Béjar <santi@agolina.net> writes:
Show 13 quoted lines
> diff --git a/revision.c b/revision.c
> index 064e351..db97250 100644
> --- a/revision.c
> +++ b/revision.c
> @@ -492,7 +492,7 @@ static void try_to_simplify_commit(struct rev_info
> *revs, struct commit *commit)
> }
> die("bad tree compare for commit %s",
> sha1_to_hex(commit->object.sha1));
> }
> - if (tree_changed && !tree_same)
> + if ((tree_changed && !tree_same) || (!revs->simplify_history
> && tree_changed))Is that the same as saying this?
if (!(tree_same && revs->simplify_history) && tree_changed) return;
Which reads: unless we find a parent that matches the result and we are simplifying the history, a child different from at least one parent is worth showing.
Which makes sort of sense at the conceptual level, but I am not sure if it is practically useful (the same issue with --full-history that makes complex history almost unreadable).