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

Re: [PATCH] commit: reword --author error message

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Jan 15, 2015, 14:40 UTC
Message-ID
<54B7D166.8090608@drmicha.warpmail.net>
In-Reply-To
<20150115143120.GA16736@peff.net>
Jeff King schrieb am 15.01.2015 um 15:31:
Show 16 quoted lines
> On Thu, Jan 15, 2015 at 03:23:08PM +0100, Michael J Gruber wrote:
> 
>> If an --author argument is specified but does not contain a '>' then git tries
>> to find the argument within the exiting authors; and gives the error
>> message "No existing author found with '%s'" if there is no match.
>>
>> This is confusing for users who try to specify a valid complete author
>> name.
>>
>> Rename the error message to make it clearer that the failure has two
>> reasons in this case:
>> "Bad --author parameter '%s': neither completely wellformed nor part of
>> an existing one"
> 
> I really like the intent of this patch, but I actually find the new
> message even more confusing.

The main observation is that the current error message is given only when both interpretations (complete ident, match ident) fail, and the error message conveys only one when it should do both. I don't care about the wording either.

Show 11 quoted lines
> Is this a time when we could use hint() to give a multi-line explanation
> (and probably a matching advice.* config)? Like:
> 
>   hint: If the --author parameter contains angle brackets ("<>"), it
>   hint: is treated as a literal name/email pair to use. If not, then
>   hint: the history is searched for an existing matching author.
> 
> or something?
> 
> -Peff
> 

Well, this basically copies the man page paragraph for that option. I don't want to set a(nother) precedent for doing this and create yet another config knob.

The alternative would be to just say "Bad --author parameter '%s'" (or "Invalid..."), as we do in most cases, and force the user to check the man page for the definition of "valid". I'm beginning to prefer this minimalistic approach...

Michael
Previous: Jeff KingNext: Junio C Hamano
Message 8 of 21 in “commit --amend --author error”
  1. Gunnar WagnerJan 13, 2015
  2. Michael J GruberJan 13, 2015
  3. Jeff KingJan 14, 2015
  4. Michael J GruberJan 15, 2015
  5. commit: reword --author error messageMichael J Gruber, Jan 15, 2015
  6. Michael J GruberJan 15, 2015
  7. Jeff KingJan 15, 2015
  8. Michael J GruberJan 15, 2015
  9. Junio C HamanoJan 15, 2015
  10. Jeff KingJan 16, 2015
  11. Junio C HamanoJan 16, 2015
  12. Philip OakleyJan 16, 2015
  13. Junio C HamanoJan 16, 2015
  14. Eric SunshineJan 16, 2015
  15. Junio C HamanoJan 16, 2015
  16. [PATCHv2] commit: reword --author error messageMichael J Gruber, Jan 26, 2015
  17. Jeff KingJan 26, 2015
  18. Junio C HamanoJan 27, 2015
  19. Jeff KingJan 27, 2015
  20. Philip OakleyJan 27, 2015
  21. Ramsay JonesJan 27, 2015

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.