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

Re: [PATCH] describe: teach --match to handle branches and remotes

From
Max Kirillov <max@max630.net>
Date
Sep 20, 2017, 01:07 UTC
Message-ID
<20170920010719.GA12408@jessie.local>
In-Reply-To
<xmqqzi9rsgxz.fsf@gitster.mtv.corp.google.com>
On Tue, Sep 19, 2017 at 08:52:24AM +0900, Junio C Hamano wrote:
> I think you can use skip_prefix() to avoid counting the length of
> the prefix yourself, i.e.
Thanks, will use it.
Show 5 quoted lines
> The hardcoded +10 for "is_tag" case assumes that anything other than
> "refs/tags/something" would ever be used to call into this function
> when is_tag is true, and that may well be true in the current code
> and have been so ever since the original code was written, but it
> still smells like an invitation for future bugs.

is_tag is used later. I'll chance it so that it does not rely on it to match, but it still has to produce it.

> Was there a reason why A and c are in different cases?  Are we
> worried about case insensitive filesystems or something?

The tags have been there of different case already. I don't know why. I'll change the branch names but I'm reluctant to touch existing tests.

-- 
Max
Previous: Jacob KellerNext: Max Kirillov
Message 4 of 5 in “describe: teach --match to handle branches and remotes”
  1. describe: teach --match to handle branches and remotesMax Kirillov, Sep 17, 2017
  2. Junio C HamanoSep 18, 2017
  3. Jacob KellerSep 19, 2017
  4. Max KirillovSep 20, 2017
  5. describe: teach --match to handle branches and remotesMax Kirillov, Sep 20, 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.