git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kirill Likhodedov <kirill.likhodedov@gmail.com>
To: git <git@vger.kernel.org>
Cc: Julia Beliaeva <julia.beliaeva@gmail.com>
Subject: git log date filter behavior with --date-order
Date: Fri, 21 Aug 2015 17:56:18 +0300	[thread overview]
Message-ID: <C06C0196-5DEB-4C7B-A714-48D009688342@gmail.com> (raw)

Hi,

I’ve faced a strange behavior when filtering git log by date.

When used with “--date-order” it gives significantly less results that when used without that option:

#  git log --pretty=oneline --remotes "--after=Wed May 20 23:00:00 MSK 2015" "--before=Fri May 22 00:00:00 MSK 2015" -- | wc -l
      85
#  git log --pretty=oneline --remotes "--after=Wed May 20 23:00:00 MSK 2015" "--before=Fri May 22 00:00:00 MSK 2015" --date-order -- | wc -l
      25

My assumption is that git log walks from the specified heads down to the past until it finds a commit which commit date matches the filter. Then it continues until it finds a commit which commit date doesn’t match the filter. Is it true?

Commits from “matching” and “unmatching” parts of the output are located in different branches which are being developed in parallel. 
AFAIU the flag “--date-order” is meant to place commits from different branches near each other, if they were performed at the same time.

But when I looked both at the “matching" and the “unmatching” commits in the whole `git log --date-order` view, I’ve noticed that they are placed really far away from each other (with about 4K commits between them).

Could you please give me a hint, why can git log --date-order behave like that? 

I’ll be happy to provide more details if needed. 

Thanks a lot!
Kirill.

                 reply	other threads:[~2015-08-21 14:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C06C0196-5DEB-4C7B-A714-48D009688342@gmail.com \
    --to=kirill.likhodedov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=julia.beliaeva@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.
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 NNTP newsgroup(s).