Thread (10 messages) flat view 10 messages, 3 authors, 2017-01-04

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

From: Stefan Beller <hidden>
Date: 2017-01-04 23:10:52

On Tue, Jan 3, 2017 at 11:55 PM, Jeff King [off-list ref] wrote:
As this last bit is quoted from me, I won't deny that it's brilliant as
usual.
obviously. :)
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)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help