Skip to content

Commit c173dad

Browse files
Ralf Thielowgitster
authored andcommitted
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 <[email protected]> Reviewed-by: Jonathan Nieder <jrnieder <at> gmail.com> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d1cc462 commit c173dad

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

server-info.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,8 @@ static int read_pack_info_file(const char *infofile)
113113
goto out_stale;
114114
break;
115115
case 'D': /* we used to emit D but that was misguided. */
116-
goto out_stale;
117-
break;
118116
case 'T': /* we used to emit T but nobody uses it. */
119117
goto out_stale;
120-
break;
121118
default:
122119
error("unrecognized: %s", line);
123120
break;

0 commit comments

Comments
 (0)