Skip to content

Commit

Permalink
update-server-info: Shorten read_pack_info_file()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ralf Thielow authored and gitster committed Jul 19, 2010
1 parent d1cc462 commit c173dad
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions server-info.c
Expand Up @@ -113,11 +113,8 @@ static int read_pack_info_file(const char *infofile)
goto out_stale; goto out_stale;
break; break;
case 'D': /* we used to emit D but that was misguided. */ 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. */ case 'T': /* we used to emit T but nobody uses it. */
goto out_stale; goto out_stale;
break;
default: default:
error("unrecognized: %s", line); error("unrecognized: %s", line);
break; break;
Expand Down

0 comments on commit c173dad

Please sign in to comment.