Re: [PATCH 3/9] revert: tolerate extra spaces, tabs in insn sheet
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Dec 9, 2011, 19:40 UTC
- Message-ID
- <20111209194003.GE20913@elie.hsd1.il.comcast.net>
- In-Reply-To
- <1323445326-24637-4-git-send-email-artagnon@gmail.com>
Ramkumar Ramachandra wrote:
Show 9 quoted lines
> +++ b/builtin/revert.c > @@ -727,7 +727,11 @@ static struct commit *parse_insn_line(char *bol, char *eol, struct replay_opts * > } else > return NULL; > > + /* Eat up extra spaces/ tabs before object name */ > + while (*bol == ' ' || *bol == '\t') > + bol += 1; > - end_of_object_name = bol + strcspn(bol, " \n");
Why not use strspn? What happens if I use a tab immediately after the pick/revert keyword?