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

Re: [PATCH 2/2] pathspec: give better message for submodule related pathspec error

From
Stefan Beller <sbeller@google.com>
Date
Jan 4, 2017, 23:10 UTC
Message-ID
<CAGZ79kagAX-ZjO_k7LxQNHp=Le9C=WzYQxxe-bRFneHjDwnqSw@mail.gmail.com>
In-Reply-To
<20170104075506.sa5oa5bheykswkwn@sigill.intra.peff.net>
On Tue, Jan 3, 2017 at 11:55 PM, Jeff King <peff@peff.net> wrote:
> As this last bit is quoted from me, I won't deny that it's brilliant as
> usual.
obviously. :)
Show 11 quoted lines
>
> But as this commit message needs to stand on its own, rather than as part of a
> larger discussion thread, it might be worth expanding "one of the cases"
> here. And talking about what's happening to the other cases.
>
> Like:
>
>   This assertion triggered for cases where there wasn't a programming
>   bug, but just bogus input. In particular, if the user asks for a
>   pathspec that is inside a submodule, we shouldn't assert() or
>   die("BUG"); we should tell the user their request is bogus.
alt. cont'd:

We already would do that if PATHSPEC_STRIP_SUBMODULE_SLASH_EXPENSIVE is set, but we had to ask for this examination via a flag, because it is expensive. At this point in code we know there is bogus input, so all we would do is error out. For that case we can assume that the cost of the expensive search is negligible compared to the users head scratching that follows.

(This will appear in the patch I am about to send out)
Previous: Stefan Beller
Message 10 of 10 in “[PATCHv4 0/2] pathspec: give better message for submodule related pathspec error”
  1. Stefan BellerJan 4, 2017
  2. 1/2 submodule tests: don't use itself as a submoduleStefan Beller, Jan 4, 2017
  3. 2/2 pathspec: give better message for submodule related pathspec errorStefan Beller, Jan 4, 2017
  4. Jeff KingJan 4, 2017
  5. Stefan BellerJan 4, 2017
  6. Brandon WilliamsJan 4, 2017
  7. [PATCHv5] pathspec: give better message for submodule related pathspec errorStefan Beller, Jan 4, 2017
  8. Brandon WilliamsJan 4, 2017
  9. Stefan BellerJan 4, 2017
  10. Stefan BellerJan 4, 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.