diff options
author | Matthieu Moy <Matthieu.Moy@imag.fr> | 2015-10-01 10:18:42 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-10-05 22:39:56 -0700 |
commit | 1db168ee971a6a61ce72480e1db9ddfd3629bfcf (patch) | |
tree | 277aea9e0571f98073e7e7aecb22ccd19901b8b2 /t/t5515/fetch.master_config-explicit | |
parent | rebase-i: explicitly accept tab as separator in commands (diff) | |
download | tgif-1db168ee971a6a61ce72480e1db9ddfd3629bfcf.tar.xz |
rebase-i: loosen over-eager check_bad_cmd check
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 <gitster@pobox.com>
[jc: updated test with quickfix from Torsten Bögershausen]
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5515/fetch.master_config-explicit')
0 files changed, 0 insertions, 0 deletions