On Mon, Jan 6, 2020 at 5:02 AM Gregory Nutt <spudan...@gmail.com> wrote:
>
>
> > Something strange is happening with the git repositories.
> >
> > Several times recently, I have seen things inexplicably disappear and 
> > reappear.
>
> You had me going with that.  The answer is that the order of the commits
> is not in date order.  Look:
>
>     commit 3951c4de5af427b204b77ae484fbd8175ed07842
>     Merge: 7da409f3b5 9e091d2027
>     Author: Gregory Nutt <gn...@nuttx.org>
>     Date:   Sat Jan 4 07:58:30 2020 -0600
>
>          Merge branch 'master' of github.com:apache/incubator-nuttx
>
>     commit 7da409f3b53b4d2607b4551b059abb69ad3ad33b
>     Author: liuhaitao <liuhai...@xiaomi.com>
>     Date:   Thu Jan 2 17:22:08 2020 +0800
>
>     commit 9e091d2027a42fbec14555ae98c76e7579cd8b8e
>     Author: Mateusz Szafoni <raide...@railab.me>
>     Date:   Sat Jan 4 09:44:00 2020 -0300
>
> Is it possible that the local clone was unclean when commit
> 7da409f3b53b4d2607b4551b059abb69ad3ad33b was made?  I did that one, I
> don't think that was ever the case.
>
> Again 'git show 7da409f3b53b4d2607b4551b059abb69ad3ad33b' shows no problem.
>
> 7da409f3b53b4d2607b4551b059abb69ad3ad33b was committed on Jan 2,
> 9e091d2027a42fbec14555ae98c76e7579cd8b8e was committed on Jan 2. So the
> order of the commits in 'git log' does not reflect the date order.
>
> Also lock at the github.com/apache/incubator-nuttx.  Look at the last
> commit.  It has two parents (because it was merged) follow the left
> parent back to 3951c4d:
> https://github.com/apache/incubator-nuttx/commit/3951c4de5af427b204b77ae484fbd8175ed07842
>
> Notice that it has two parents: 7da409f
> <https://github.com/apache/incubator-nuttx/commit/7da409f3b53b4d2607b4551b059abb69ad3ad33b>
> + 9e091d2
> <https://github.com/apache/incubator-nuttx/commit/9e091d2027a42fbec14555ae98c76e7579cd8b8e>
>

Can we always use "Rebase and merge" here? The "Create a merge
commit"(default option) generate many empty merge commits which make
the history hard to read.

> That is where the merge occurred and the two commits from different
> times were merge into commit order.  Try this:
>
>     git log --date-order.
>
> That will be clearly and will behave as you expect, 7da409f
> <https://github.com/apache/incubator-nuttx/commit/7da409f3b53b4d2607b4551b059abb69ad3ad33b>
> and 9e091d2
> <https://github.com/apache/incubator-nuttx/commit/9e091d2027a42fbec14555ae98c76e7579cd8b8e>swap
> positions and if you follow that you will see that nothing disappeared..
> You were jumpting backwared in time
>
> Greg
>
>
>
>

Reply via email to