All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Thomas Rast <trast@inf.ethz.ch>
Cc: Lukas Fleischer <git@cryptocrack.de>,
	John Keeping <john@keeping.me.uk>,
	Alois Mahdal <Alois.Mahdal.1-ndmail@zxcvb.cz>,
	"git\@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: --follow is ignored when used with --reverse
Date: Tue, 02 Jul 2013 12:11:46 -0700	[thread overview]
Message-ID: <7v38rw93pp.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <87vc4t9tn5.fsf@linux-k42r.v.cablecom.net> (Thomas Rast's message of "Tue, 2 Jul 2013 11:51:42 +0200")

Thomas Rast <trast@inf.ethz.ch> writes:

> Lukas Fleischer <git@cryptocrack.de> writes:
>
>> On Tue, Jul 02, 2013 at 10:19:36AM +0100, John Keeping wrote:
> [...]
>>>     $ git log --oneline --follow builtin/clone.c | wc -l
>>>     125
>>>     $ git log --oneline --follow --reverse builtin/clone.c | wc -l
>>>     3
>>
>> I just wanted to point out that it works fine when specifying the *original*
>> file name (which kind of makes sense given that everything is done in reverse
>> order):
> [...]
>> However, that also doesn't seem to work for builtin/clone.c:
>>
>>     $ git log --oneline --follow --reverse -- builtin-clone.c | wc -l
>>     65
>
> I'm pretty sure that is simply because --follow iis a horrible hack,
> known to be broken in many ways.

The machinery the follow uses simplifies the history with dynamic
pathspec correctly (in a simple history, at least), but the output
is coupled too strongly to the traversal. If you collect all the
revs you will show first, reverse them and then try to show (which
is what --reverse essentially is), the dynamic pathspec used for
each rev is long gone.

Perhaps we should make --follow mutually incompatible with
problematic options (I suspect --reverse is not the only case) at
the command line parser level to avoid hurting users.

  parent reply	other threads:[~2013-07-02 19:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-23 23:23 --follow is ignored when used with --reverse Alois Mahdal
2013-07-02  8:56 ` alois.mahdal.1-ndmail
2013-07-02  9:12 ` Ramkumar Ramachandra
2013-07-02  9:19 ` John Keeping
2013-07-02  9:38   ` Lukas Fleischer
2013-07-02  9:51     ` Thomas Rast
2013-07-02 10:41       ` John Keeping
2013-07-02 19:11       ` Junio C Hamano [this message]
2013-07-02 11:20 ` Johannes Sixt

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=7v38rw93pp.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Alois.Mahdal.1-ndmail@zxcvb.cz \
    --cc=git@cryptocrack.de \
    --cc=git@vger.kernel.org \
    --cc=john@keeping.me.uk \
    --cc=trast@inf.ethz.ch \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.