threads / discuss / 32375

Git Log and History Simplification

Subject: Git Log and History Simplification

## tl;dr

4 messages between Dec 17, 2012 and Dec 17, 2012.

replies: 3people: 4as markdown or json

Dinesh Subramani· Dec 17, 2012, 11:33 UTC · lore
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.

Regards, Dinesh

Nguyen Thai Ngoc Duy· Dec 17, 2012, 11:49 UTC · re: Dinesh Subramani · lore

Re: Git Log and History Simplification

On Mon, Dec 17, 2012 at 6:33 PM, Dinesh Subramani <dinesh.subramani@gmail.com> wrote:

Show 7 quoted lines
> 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.

-- 
Duy
Junio C Hamano· Dec 17, 2012, 19:53 UTC · re: Nguyen Thai Ngoc Duy · lore

Re: Git Log and History Simplification

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 ;-)
Tomas Carnecky· Dec 17, 2012, 12:34 UTC · re: Dinesh Subramani · lore

Re: Git Log and History Simplification

On Mon, 17 Dec 2012 17:03:09 +0530, Dinesh Subramani <dinesh.subramani@gmail.com> wrote:
Show 7 quoted lines
> 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.

The way I understand the man page, to disable history simplification you have to use --full-history --sparse.

← back to recent threads