Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 <>
Reviewed-by: Jonathan Nieder <jrnieder <at>>
Signed-off-by: Junio C Hamano <>
  • Loading branch information...
commit c173dad58787a7f11a526dbcdaa5a2fe9ff1c87f 1 parent d1cc462
@ralfth ralfth authored committed
Showing with 0 additions and 3 deletions.
  1. +0 −3  server-info.c
3  server-info.c
@@ -113,11 +113,8 @@ static int read_pack_info_file(const char *infofile)
goto out_stale;
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;
error("unrecognized: %s", line);
Please sign in to comment.
Something went wrong with that request. Please try again.