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

Re: [PATCH] interpret_branch_name(): handle auto-namelen for @{-1}

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 27, 2017, 19:27 UTC
Message-ID
<xmqq4lzfxwmq.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20170227093122.3jdb2b62hlbbio5r@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 14 quoted lines
> On Mon, Feb 27, 2017 at 04:25:40AM -0500, Jeff King wrote:
>
>> However, before we do that auto-namelen magic, we call
>> interpret_nth_prior_checkout(), which gets fed the bogus
>> "0". This was broken by 8cd4249c4 (interpret_branch_name:
>> always respect "namelen" parameter, 2014-01-15).  Though to
>> be fair to that commit, it was broken in the _opposite_
>> direction before, where we would always treat "name" as a
>> string even if a length was passed.
>
> That commit is mine, by the way. More embarrassing than introducing the
> bug is that I _noticed_ the problem at the time and wrote a paragraph in
> the commit message rationalizing why it was OK, rather than just doing
> this trivial fix.

Thanks, I should also be embarrased since I didn't even notice the issue when we queued it ;-)

Previous: Jeff King
Message 3 of 3 in “interpret_branch_name(): handle auto-namelen for @{-1}”
  1. interpret_branch_name(): handle auto-namelen for @{-1}Jeff King, Feb 27, 2017
  2. Jeff KingFeb 27, 2017
  3. Junio C HamanoFeb 27, 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.