aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Thielow <ralf.thielow@googlemail.com>2010-07-19 18:26:12 +0200
committerJunio C Hamano <gitster@pobox.com>2010-07-19 11:13:52 -0700
commitc173dad58787a7f11a526dbcdaa5a2fe9ff1c87f (patch)
tree8fb988fbfa7ba9d22f1b668a41e3effa48352ee0
parentd1cc4621eda62222fbc929a7f65c89b6be678c2e (diff)
downloadgit-c173dad58787a7f11a526dbcdaa5a2fe9ff1c87f.tar.gz
git-c173dad58787a7f11a526dbcdaa5a2fe9ff1c87f.tar.xz
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>
-rw-r--r--server-info.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/server-info.c b/server-info.c
index 4098ca2b5..9ec744e9f 100644
--- a/server-info.c
+++ b/server-info.c
@@ -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;