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

Re: Git Log and History Simplification

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 17, 2012, 19:53 UTC
Message-ID
<7vvcc0lakr.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CACsJy8BsL03zr_wGZH5kqS0NaMfPKct2T7_62jstxRB4c_FudQ@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
Show 13 quoted lines
> On Mon, Dec 17, 2012 at 6:33 PM, Dinesh Subramani
> <dinesh.subramani@gmail.com> wrote:
>> I am using the below command :
>>
>> git log --stat --decorate=full --since=<date>
>>
>> Can you please let me know if the above command will list all the
>> commits and would not skip any of the commits due to History
>> Simplification. Any help would be very useful.
>
> If my memory is still functioning, history simplification only takes
> place when you specify pathspec. The above command does not have
> pathspec, so no history simplification.

Think of the pathspec limiting as asking to choose commits by one criteria (i.e. touches paths in a way that matters in the result), like any other commit limiting criteria like "--grep" (i.e. asks to choose commits that has the given string in its message).

With something like --author or --grep, we would need to look at each individual commmit to decide if it matches the criteria. With pathspec, when we look at a single-parent commit, we inspect it to decide if it matches the criteria of touching the specified paths.

When we are looking at a merge commit, however, if one of the parents match the result at all the paths that match the given pathspec, we know any and all commits on the other side branches do not matter in the result, hence we can omit them by not even having to follow that parent ancestry.

If you mention --full-history in your answer, it will be perfect ;-)
Previous: Nguyen Thai Ngoc DuyNext: Tomas Carnecky
Message 3 of 4 in “Git Log and History Simplification”
  1. Dinesh SubramaniDec 17, 2012
  2. Nguyen Thai Ngoc DuyDec 17, 2012
  3. Junio C HamanoDec 17, 2012
  4. Tomas CarneckyDec 17, 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.