git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Josh Bleecher Snyder <josharian@gmail.com>
Subject: Re: [RFC/PATCH] log: add log.firstparent option
Date: Sat, 25 Jul 2015 10:41:21 -0700	[thread overview]
Message-ID: <xmqqh9osjfsu.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150725020526.GA8948@peff.net> (Jeff King's message of "Fri, 24 Jul 2015 19:05:27 -0700")

Jeff King <peff@peff.net> writes:

> On Fri, Jul 24, 2015 at 08:07:49AM -0700, Junio C Hamano wrote:
>
>> Yeah, you actually convinced me reasonably well that it would
>> happen.  I'd never use it myself.  If people want to shoot
>> themselves in the foot, be my guest ;-)
>> 
>> Perhaps we should drop this, and give a shorter synonym to the
>> option?
>
> I'm still on the fence to have the config kick in only for HEAD.

Hmm, I cannot tell offhand if the confusion factor is worth it (I
didn't say "I don't think it is worth it").  I'd imagine that one
common thing to want is to get an overview of what has happened
upstream since the topic one is currently working on forked from it,
i.e. "log --first-parent ..master", for an individual contributor,
and nother is to see what has happened since the last stable point,
i.e. "log --first-parent origin.." or "log --first-parent v1.0..",
for an integrator.  Neither is covered by the "fp when implied HEAD".

When I am playing an individual contributor, I often want to see my
progress with "log -9" or something, only because "log origin.." is
longer to type and I know my topic is not that long as nine commits.
I guess implied first-parent would not hurt that much in that case,
simply because I do not expect too many merges on a topic, but it
feels wrong to default to first-parent traversal there.

So...

> It feels somewhat magical, but at least the config option name makes it
> painfully clear exactly when it would kick in. I dunno. I am happy
> enough for myself to just run "--first-parent" when that is what I want
> to see. Giving it a shorter name would not help much, I think.

I admit I may be minority, but two common things I do everyday are
"log --first-parent v2.5.0-rc0.." and "log --first-parent master..pu";
I could certainly use a short-hand there.

I already have alias for it, so this is not to help me personally,
but "log -FO" to trigger first-parent one-line would make the alias
unnecessary.

> It is not
> the number of characters, but the fact that most people do not _know_
> that --first-parent exists in the first place, or that it would be
> useful in this case.

That is a separate "education" problem.  My suggestion was more
about "I know there is a way already, but it is cumbersome to type".

> I hoped with a config option it might become
> something projects could recommend to their users[1] if the project has a
> matching workflow. But maybe we could also rely on those same projects
> to educate their users.

They could educate their users to use "log -F" just like they could
tell them to say "config log.firstparent true", I would think.  The
risk of the latter is that those who blindly follow the config path
without understanding what is going on will not even realize that
the problem is that they told Git to only follow the first-parent
path, when they do want to see commits on the side branch, let alone
discovering how to countermand it from the command line one shot.

An instruction to use an extra option, on the other hand, makes it
clear that there is a non-default thing going on, which is more
discoverable: "perhaps I can run it without -F?"

  reply	other threads:[~2015-07-25 17:42 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23  1:23 [RFC/PATCH] log: add log.firstparent option Jeff King
2015-07-23  4:40 ` Config variables and scripting // was " David Aguilar
2015-07-23  5:14   ` Jeff King
2015-07-23  5:48     ` Jeff King
2015-07-23  6:32       ` Jacob Keller
2015-07-23  6:53         ` Jeff King
2015-07-23  6:55           ` Jacob Keller
2015-07-23  9:53             ` Michael J Gruber
2015-07-23 17:35               ` Jeff King
2015-07-23 17:37     ` Junio C Hamano
2015-07-23 22:14 ` Stefan Beller
2015-07-24  7:40   ` Jeff King
2015-07-24  7:46     ` Jacob Keller
2015-07-24  8:17       ` Jeff King
2015-07-24 15:31     ` Junio C Hamano
2015-07-25  1:36       ` Jeff King
2015-07-25  1:47         ` Jeff King
2015-07-25 17:18           ` Junio C Hamano
2015-07-27  4:43             ` Jeff King
2015-07-23 22:46 ` Junio C Hamano
2015-07-24  6:07   ` Jacob Keller
2015-07-24  7:34     ` Jeff King
2015-07-24  7:44       ` Jacob Keller
2015-07-24 15:04       ` Junio C Hamano
2015-07-24 18:13         ` Jeff King
2015-07-24  7:21   ` Jeff King
2015-07-24  7:23   ` Jeff King
2015-07-24 15:07     ` Junio C Hamano
2015-07-25  2:05       ` Jeff King
2015-07-25 17:41         ` Junio C Hamano [this message]
2015-07-25 22:41           ` Jacob Keller
2015-07-27  4:55           ` Jeff King

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=xmqqh9osjfsu.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=josharian@gmail.com \
    --cc=peff@peff.net \
    /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).