From: Eric Sunshine Date: Wed, 30 Sep 2015 20:04:44 GMT Subject: Re: [PATCH] rebase-i: loosen over-eager check_bad_cmd check Message-ID: In-Reply-To: <1443643292-14505-1-git-send-email-Matthieu.Moy@imag.fr> On Wed, Sep 30, 2015 at 4:01 PM, Matthieu Moy wrote: > 804098bb (git rebase -i: add static check for commands and SHA-1, > 2015-06-29) tried to check all insns before running any in the todo > list, but it did so by implementing its own parser that is a lot > stricter than necessary. We used to allow lines that are indented > (including comment lines), and we used to allow a whitespace between > the insn and the commit object name to be HT, among other things, > that are flagged as an invalid line by mistake. > > Fix this by using the same tokenizer that is used to parse the todo > list file in the new check. > > Whether it's a good thing to accept indented comments is > debatable (other commands like "git commit" do not accept them), but we > already accepted them in the past, and some people and scripts rely on > this behavior. Also, a line starting with space followed by a '#' cannot > have any meaning other than being a comment, hence it doesn't harm to > accept them as comments. > > Largely based on patch by: Junio C Hamano Missing sign-off.