Re: [PATCH] check-ref-format: require a repository for --branch
- From
Jeff King <peff@peff.net>
- Date
- Aug 17, 2017, 10:23 UTC
- Message-ID
- <20170817102358.yiugmv5je6sfw4lo@sigill.intra.peff.net>
- In-Reply-To
- <CAKY_R-vsZo_OsA8F6DVx_4zi5=RpBfOn-w1Ou7pq-F7HTtptzg@mail.gmail.com>
On Mon, Jul 17, 2017 at 11:18:43PM +0200, Marko Kungla wrote:
Show 5 quoted lines
> I guess that should only be about that it should not hit a (BUG). > In my case in the example I gave I scan trough the directories to > check repository status one of the tasks make use of check-ref-format. > Since it may hit directory which is not a git repository it should not > expose error (BUG) right.
Right. The BUG should definitely be corrected. Between what Jonathan is suggesting and my patch, either would be fine for the case you described originally ("--branch @{-1}" would always fail in a non-repo).
-Peff