git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leila <muhtasib@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH/RFC] revision: Show friendlier message.
Date: Mon, 25 Jun 2012 23:46:16 -0400	[thread overview]
Message-ID: <CAA3EhHJfRY=UpuriqB-ARdui3BS6tCpn+Zoi_ccJ15181qGMaw@mail.gmail.com> (raw)
In-Reply-To: <7vsjdjdm7v.fsf@alter.siamese.dyndns.org>

On Mon, Jun 25, 2012 at 7:07 PM, Junio C Hamano <gitster@pobox.com> wrote:
>>> The "bad HEAD and no revs..." part, if we choose not to even error
>>> on this, can be removed.
>>
>> Yea, I think we should return successfully, and warning() does that.
>> But if we choose to display a message, I don't think it should be a
>> warning (esp for the empty repo case). It should look like the sample
>> printf below, but the v2 of the patch I submitted doesn't include the
>> message.
>
> I said "*if* we choose not to" for a reason.  It can be argued that
> it technically is a regression that "git log" does *not* error out
> for an unborn history, as that is different from the way the command
> has behaved forever.
>

Yes, this is def a concern. Ok here are my thoughts on the four options:
1) Display error message and error. (current behavior)
I don't agree with this, thus the patch I'm creating.
2) Display a friendlier message and error.
I think this is a good option, and preserving the return code will be
less likely to break things (this idea was present in my first patch).
3) Display success message and succeed.
This makes sense to me, but this would be changing the behavior drastically.
4) Succeed silently
I created my second patch to follow this model. I eventually chose
this over 3, because I figured it was more in-tune with the rest of
git's behavior with succeeding silently.

So how do we break the tie between #2 and #4? I think #2 is playing it
safer than #4, even though #4 is more ideal.

> Again, "might want" was a key phrase.  I didn't look at each and
> every one of them and thought if it made sense to change their
> behaviour.
>

Yes, I understood that. I believe I left one out.

      reply	other threads:[~2012-06-26  3:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-23 19:11 [PATCH/RFC] revision: Show friendlier message Leila Muhtasib
2012-06-25  5:28 ` Junio C Hamano
2012-06-25  5:58   ` Junio C Hamano
2012-06-25 19:14   ` Leila
2012-06-25 19:49     ` Junio C Hamano
2012-06-25 22:53       ` Leila
2012-06-25 23:07         ` Junio C Hamano
2012-06-26  3:46           ` Leila [this message]

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='CAA3EhHJfRY=UpuriqB-ARdui3BS6tCpn+Zoi_ccJ15181qGMaw@mail.gmail.com' \
    --to=muhtasib@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).