git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: hsed@unimetic.com
To: Junio C Hamano <gitster@pobox.com>
Cc: Git <git@vger.kernel.org>
Subject: Re: [PATCH V3] config: add --expiry-date
Date: Fri, 17 Nov 2017 18:15:09 +0000	[thread overview]
Message-ID: <aaff8c91c03bbbc797183f26440496b6@unimetic.com> (raw)
In-Reply-To: <xmqqlgj7xcuf.fsf@gitster.mtv.corp.google.com>

On 2017-11-16 00:54, Junio C Hamano wrote:
> 
>> -	if (parse_expiry_date(value, expire))
>> -		return error(_("'%s' for '%s' is not a valid timestamp"),
>> -			     value, var);
>> ...
>> +	if (parse_expiry_date(value, timestamp))
>> +		die(_("failed to parse date_string in: '%s'"), value);
> 
> This is an unintended change in behaviour (or at least undocumented
> in the log message) for the "git reflog" command, no?
> 
> Not just the error message is different, but the original gave the
> calling code a chance to react to the failure by returning -1 from
> the function, but this makes the command fail outright here.
> 
> Would it break anything if you did "return error()" just like the
> original used to?  Are your callers of this new function not
> prepared to see an error return?

I did notice the slight change in the error handling but the new one
was copied from one of the other functions in builtin/config.c. I
will revert it to the old method and if the new (and other) tests still
pass, I will provide an updated patch.

Kind Regards,
Haaris

  reply	other threads:[~2017-11-17 18:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-12 12:19 [PATCH] config: added --expiry-date type support Haaris
2017-11-12 13:55 ` Kevin Daudt
2017-11-12 14:22   ` Jeff King
2017-11-12 14:55 ` Jeff King
     [not found]   ` <a05a8e8020ec31cfd9a0271ce2a00034@unimetic.com>
2017-11-12 19:43     ` hsed
2017-11-14  2:04   ` [PATCH V2] config: add --expiry-date hsed
2017-11-14  6:21     ` Christian Couder
2017-11-14 16:03       ` Marc Branchaud
2017-11-14  6:38     ` Junio C Hamano
2017-11-15 22:10       ` hsed
2017-11-16  0:05       ` [PATCH V3] " hsed
2017-11-16  0:54         ` Junio C Hamano
2017-11-17 18:15           ` hsed [this message]
2017-11-18  2:27           ` [PATCH V4] " hsed
2017-11-18  3:37             ` Junio C Hamano
2017-11-20 14:53               ` hsed
2017-11-20 17:04               ` Jeff King
2017-11-20 20:28                 ` Stefan Beller
2017-11-20 20:37                   ` Jeff King
2017-11-30 11:18                     ` Heiko Voigt
2017-11-30 17:45                       ` 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=aaff8c91c03bbbc797183f26440496b6@unimetic.com \
    --to=hsed@unimetic.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).