author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 30 May 2007 06:13:14 +0000 (02:13 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 30 May 2007 06:31:06 +0000 (23:31 -0700) | ||
commit | b77ffe8a57a0921f58cff22dcf1ed6ae64d89d6a | |
tree | 67d687cc3fdf5321caf2089eef702fb8e89e56aa | tree | snapshot |
parent | eaa867703927c1f383637979d16c40d996cea240 | commit | diff |
Ensure the pack index is opened before access
In this particular location of fsck the index should have already
been opened by verify_pack, which is called just before we get
here and loop through the object names. However, just in case a
future version of that function does not use the index file we'll
double-check its open before we access the num_objects field.
Better safe now than sorry later.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
In this particular location of fsck the index should have already
been opened by verify_pack, which is called just before we get
here and loop through the object names. However, just in case a
future version of that function does not use the index file we'll
double-check its open before we access the num_objects field.
Better safe now than sorry later.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-fsck.c | diff | blob | history |