git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Stefan Beller" <sbeller@google.com>,
	Валентин <valiko.ua@gmail.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: "git shortlog -sn --follow -- <path>" counts all commits to entire repo
Date: Sat, 09 Sep 2017 02:37:20 +0900	[thread overview]
Message-ID: <xmqqbmmlytv3.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170908074910.reoyb47navgsg6kt@sigill.intra.peff.net> (Jeff King's message of "Fri, 8 Sep 2017 03:49:10 -0400")

Jeff King <peff@peff.net> writes:

> Yeah. It depends on exactly how such a fix is made. I think one
> improvement would be to actually bump --follow handling into the
> limit_list() stage, so that we properly handle history simplification
> over followed paths. In which case get_revision() would just never
> return the uninteresting commits, and the current shortlog code would
> Just Work.
>
> That said, I don't think we can go wrong by making shortlog's traversal
> more like log's. Any changes we make to --follow will be aimed at and
> tested with git-log, so the more code they share the more likely it is
> that shortlog won't bitrot.

Both true.  

Using log-tree traversal machinery instead of just get_revision()
would probably mean we would slow it down quite a bit unless we are
careful, but at the same time, things like "git shortlog -G<string>"
would suddenly start working, so this is not just helping the
"--follow" hack.


  reply	other threads:[~2017-09-08 17:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-07 18:13 "git shortlog -sn --follow -- <path>" counts all commits to entire repo Валентин
2017-09-07 19:30 ` Stefan Beller
2017-09-08  5:10   ` Jeff King
2017-09-08  6:38     ` Junio C Hamano
2017-09-08  7:49       ` Jeff King
2017-09-08 17:37         ` Junio C Hamano [this message]
2017-09-09  6:52           ` Jeff King
2017-09-10  7:36             ` Junio C Hamano

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=xmqqbmmlytv3.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sbeller@google.com \
    --cc=valiko.ua@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).