From: Adam Lee <adam8157@gmail.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [Bug report] git log shows a wrong history
Date: Sat, 12 Nov 2022 16:28:26 +0800 [thread overview]
Message-ID: <CABAGCCpdKesUaNiJmH4w8OqTWbXiPNJ2tRM-XwPs6ndUpzEXbg@mail.gmail.com> (raw)
In-Reply-To: <20221112071313.GE1159673@szeder.dev>
On Sat, Nov 12, 2022 at 3:13 PM SZEDER Gábor <szeder.dev@gmail.com> wrote:
> 'git log' shows the commis in reverse chronological order by default,
> which means that if development happens on multiple parallel running
> branches, then commits made on different branches might be shown
> intermixed.
>
> And indeed the commit timestamp of f9c655 is between that of the other
> two:
>
> $ git log --format='%H %ct' |grep -A2 ^9ac9a7
> 9ac9a7fd4138988d744e0b5767883c06c20ffa6f 1657232286
> f9c655d647427b45ae0d7bd9baf3551a013b8ea1 1657195677
> fe0a9ddbdd7eee572f7321f9680280044fd5f258 1657177514
>
> (Using the seconds since epoch timestamp format here, because those
> three commits were made in different time zones, making their ordering
> by simply looking at them not quite that straightforward.)
>
> Showing commits in topographical order "avoids showing commits on
> multiple lines of history intermixed" (quoting the manpage), although
> at the cost of slightly more processing time:
>
> $ git log --format='%H %ct' --topo-order |grep -A2 ^9ac9a7
> 9ac9a7fd4138988d744e0b5767883c06c20ffa6f 1657232286
> fe0a9ddbdd7eee572f7321f9680280044fd5f258 1657177514
> 5a9a4091ad1a187cec9d7da0faafac15b088fe60 1657172979
>
> > `git log --graph` is fine.
>
> '--graph' implies '--topo-order' by default.
>
Ah, I see, thanks.
I didn't expect that default behavior, looks so strange to me...
--
Adam
prev parent reply other threads:[~2022-11-12 8:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-12 4:23 [Bug report] git log shows a wrong history Adam Lee
2022-11-12 7:13 ` SZEDER Gábor
2022-11-12 8:28 ` Adam Lee [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CABAGCCpdKesUaNiJmH4w8OqTWbXiPNJ2tRM-XwPs6ndUpzEXbg@mail.gmail.com \
--to=adam8157@gmail.com \
--cc=git@vger.kernel.org \
--cc=szeder.dev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).