@matheusbsbs / matheus-bagliano / commits / c173dad587
Fork 0

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: Ralf Thielow <ralf.thielow@googlemail.com> Reviewed-by: Jonathan Nieder <jrnieder <at> gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ralf Thielow committed Jul 19, 2010 at 18:26 UTC c173dad58787a7f11a526dbcdaa5a2fe9ff1c87f
1 file changed -3
server-info.c
-3
@@ -113,11 +113,8 @@ static int read_pack_info_file(const char *infofile)
113 goto out_stale;
114 break;
115 case 'D': /* we used to emit D but that was misguided. */
116 - goto out_stale;
117 - break;
116 case 'T': /* we used to emit T but nobody uses it. */
117 goto out_stale;
120 - break;
118 default:
119 error("unrecognized: %s", line);
120 break;