All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Andreas Gruenbacher <agruenba@redhat.com>,
	git@vger.kernel.org, Bob Peterson <rpeterso@redhat.com>
Subject: Re: [RFC] revision: Add --sticky-default option
Date: Thu, 18 Oct 2018 12:23:26 +0900	[thread overview]
Message-ID: <xmqqva60uedt.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20181017181350.GB28326@sigill.intra.peff.net> (Jeff King's message of "Wed, 17 Oct 2018 14:13:51 -0400")

Jeff King <peff@peff.net> writes:

> I'd probably call it something verbose and boring like
> --use-default-with-uninteresting or --default-on-negative.
> I dunno.

These two names are improvement, but there needs a hint that the
change we are interested in is to use default even when revs are
given as long as ALL of them are negative ones.  Which in turn means
there is NO positive ones given.  

So perhaps "--use-default-without-any-positive".

Having said that, I have to wonder how serious a breakage we are
going to cause to established users and scripts if we made this
change without any explicit option.  After all, it would be rather
obvious that people will get a history with some commits (or none at
all) when they were expecting no output that the "default behaviour"
has changed.  I also wonder how would scripts take advantage of the
current "defeat --default as soon as we see any rev, even a negative
one"---in short, I am not sure if the theoretical regression this
new "option" is trying to avoid is worth avoiding in the first
place.

Is there a way to say "usually this command has built-in --default=HEAD
behaviour, but I am declining that" already, i.e. 

    $ git log --no-default $REVS

that will result in an empty set if we accept the change proposed
here but make it unconditional?  If so "This and future versions of
Git will honor the --default even when there are other revisions
given on the command line, as long as they are ALL negative ones.
This is a backward incompatibile change, but you can update your
scripts with '--no-default' if you do not like the new behaviour" in
the release notes may be a viable alternative way forward.

If there is no such way in the released versions of Git, then that
would not work, and a strict opt-in like the approach taken by the
proposed patch would become necessary.

  reply	other threads:[~2018-10-18  3:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-16 21:24 [RFC] revision: Add --sticky-default option Andreas Gruenbacher
2018-10-17  9:12 ` Jeff King
2018-10-17 13:24   ` Matthew DeVore
2018-10-17 18:11     ` Jeff King
2018-10-17 13:53   ` Andreas Gruenbacher
2018-10-17 18:13     ` Jeff King
2018-10-18  3:23       ` Junio C Hamano [this message]
2018-10-18  6:48         ` Jeff King
2018-10-18  6:59           ` Junio C Hamano
2018-10-18 12:17             ` Andreas Gruenbacher
2018-10-18 12:26               ` Junio C Hamano
2018-10-18 12:23         ` Andreas Gruenbacher

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=xmqqva60uedt.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=agruenba@redhat.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=rpeterso@redhat.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 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.