提交 c173dad5 编写于 作者: R Ralf Thielow 提交者: Junio C Hamano

update-server-info: Shorten read_pack_info_file()

The correct responses to a D and a T line in .git/objects/info/packs
are the same, so combine their case arms.  In both cases we already
‘goto’ out of the switch so while at it, remove a redundant ‘break’
to avoid yet another line of code.
Signed-off-by: NRalf Thielow <ralf.thielow@googlemail.com>
Reviewed-by: Jonathan Nieder <jrnieder <at> gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 d1cc4621
......@@ -113,11 +113,8 @@ static int read_pack_info_file(const char *infofile)
goto out_stale;
break;
case 'D': /* we used to emit D but that was misguided. */
goto out_stale;
break;
case 'T': /* we used to emit T but nobody uses it. */
goto out_stale;
break;
default:
error("unrecognized: %s", line);
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册