git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH V3] config: add --expiry-date

From
Hhsed@unimetic.com <hsed@unimetic.com>
Date
Nov 17, 2017, 18:15 UTC
Message-ID
<aaff8c91c03bbbc797183f26440496b6@unimetic.com>
In-Reply-To
<xmqqlgj7xcuf.fsf@gitster.mtv.corp.google.com>
On 2017-11-16 00:54, Junio C Hamano wrote:
Show 18 quoted lines
> 
>> -	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

Previous: Junio C HamanoNext: hsed@unimetic.com
Message 12 of 21 in “config: added --expiry-date type support”
  1. config: added --expiry-date type supportHaaris, Nov 12, 2017
  2. Kevin DaudtNov 12, 2017
  3. Jeff KingNov 12, 2017
  4. Jeff KingNov 12, 2017
  5. config: add --expiry-datehsed@unimetic.com, Nov 14, 2017
  6. Christian CouderNov 14, 2017
  7. Marc BranchaudNov 14, 2017
  8. Junio C HamanoNov 14, 2017
  9. hsed@unimetic.comNov 15, 2017
  10. config: add --expiry-datehsed@unimetic.com, Nov 16, 2017
  11. Junio C HamanoNov 16, 2017
  12. hsed@unimetic.comNov 17, 2017
  13. config: add --expiry-datehsed@unimetic.com, Nov 18, 2017
  14. Junio C HamanoNov 18, 2017
  15. hsed@unimetic.comNov 20, 2017
  16. Jeff KingNov 20, 2017
  17. Stefan BellerNov 20, 2017
  18. Jeff KingNov 20, 2017
  19. Heiko VoigtNov 30, 2017
  20. Jeff KingNov 30, 2017
  21. hsed@unimetic.comNov 12, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.