On Mon, Nov 18, 2019 at 08:13:02PM -0800, Anthony Sottile wrote: > > I think the reason this hasn't come up until now is callers are expected > > to use require_work_tree() or "rev-parse --is-inside-work-tree" first. > > > > It would probably make sense for the rev-parse documentation to also > > clarify what "the top-level directory" is. > > > > -Peff > > I realize I forgot to include the X to my Y :) -- this was a totally > silly case that I got as a bug report: > https://github.com/pre-commit/pre-commit/issues/1219 > > I *expected* an error case but didn't get one Yes, and I do agree that an error is the right thing. Would that have helped your pre-commit script? I guess it would have barfed at that point. :) It sounds like it should be checking first that it has a working tree. -Peff