merge-recursive: fix parsing of "diff-algorithm" option
The "diff-algorithm" option to the recursive merge strategy takes the name of the algorithm as an option, but it uses strcmp on the option string to check if it starts with "diff-algorithm=", meaning that this options cannot actually be used. Fix this by switching to prefixcmp. At the same time, clarify the following line by using strlen instead of a hard-coded length, which also makes it consistent with nearby code. Reported-by: NLuke Noel-Storr <luke.noel-storr@integrate.co.uk> Signed-off-by: NJohn Keeping <john@keeping.me.uk> Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
Showing
想要评论请 注册 或 登录