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

Re: [PATCH 1/2] sha1_name: fix error message for @{u}

From
Junio C Hamano <gitster@pobox.com>
Date
May 21, 2013, 18:02 UTC
Message-ID
<7vfvxgnrdo.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CALkWK0mTWtJ_U1O7ZkNU3aNFwGH456xtmDJhhmS3z1tfwFPNgA@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 22 quoted lines
> Junio C Hamano wrote:
>> Does a failure in interpret-branch-name that issue these error
>> messages always followed by die() in the caller?  I know you looked
>> at the cases you noticed as an end-user (like the above "git show @{u}"
>> example), but if some codepaths did this:
>>
>>         if (interpret-branch-name()) {
>>                 you do not seem to have upstream defined,
>>                 so I will helpfully do something else that
>>                 you probably have meant.
>>         }
>>
>> this patch will break that codepath you did not look.
>
> How can that ever happen in a non end-user case?  That failure
> requires a string containing "@{u}" to be constructed and passed as an
> argument.  Why would we ever programmatically construct "@{u}" to find
> the upstream?
>
> To put it another way: unless an end-user facing application finds an
> "@{u}" while parsing argv and passes it on to interpret-branch-name,
> isn't it impossible for an "@{u}" to end up in the argument?
So did you or did you not audit the codepath?
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 5 of 19 in “Fix invalid revision error messages for 1.8.3”
  1. 0/2 Fix invalid revision error messages for 1.8.3Ramkumar Ramachandra, May 21, 2013
  2. 1/2 sha1_name: fix error message for @{u}Ramkumar Ramachandra, May 21, 2013
  3. Junio C HamanoMay 21, 2013
  4. Ramkumar RamachandraMay 21, 2013
  5. Junio C HamanoMay 21, 2013
  6. Ramkumar RamachandraMay 21, 2013
  7. Junio C HamanoMay 21, 2013
  8. Ramkumar RamachandraMay 21, 2013
  9. Junio C HamanoMay 21, 2013
  10. Ramkumar RamachandraMay 21, 2013
  11. Junio C HamanoMay 21, 2013
  12. 2/2 sha1_name: fix error message for @{<N>}, @{<date>}Ramkumar Ramachandra, May 21, 2013
  13. Junio C HamanoMay 21, 2013
  14. Kevin BraceyMay 21, 2013
  15. Ramkumar RamachandraMay 21, 2013
  16. Junio C HamanoMay 21, 2013
  17. Ramkumar RamachandraMay 21, 2013
  18. Junio C HamanoMay 21, 2013
  19. Ramkumar RamachandraMay 21, 2013

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.