git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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).

Previous: Santi BéjarNext: Neal Groothuis
Message 9 of 14 in “Finding all commits which modify a file”
  1. Neal GroothuisJan 20, 2012
  2. Neal KreitzingerJan 21, 2012
  3. Neal GroothuisJan 23, 2012
  4. Santi BéjarJan 24, 2012
  5. Santi BéjarJan 24, 2012
  6. Linus TorvaldsJan 24, 2012
  7. Santi BéjarJan 24, 2012
  8. Santi BéjarJan 24, 2012
  9. Junio C HamanoJan 24, 2012
  10. Neal GroothuisJan 24, 2012
  11. Santi BéjarJan 24, 2012
  12. Neal GroothuisJan 25, 2012
  13. Junio C HamanoJan 26, 2012
  14. Tay Ray ChuanJan 22, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.