Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-fsck.c')
-rw-r--r--builtin-fsck.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/builtin-fsck.c b/builtin-fsck.c
index 21f1f9e91d..4e5aa33dfb 100644
--- a/builtin-fsck.c
+++ b/builtin-fsck.c
@@ -348,7 +348,7 @@ static int fsck_tag(struct tag *tag)
return 0;
}
-static int fsck_sha1(unsigned char *sha1)
+static int fsck_sha1(const unsigned char *sha1)
{
struct object *obj = parse_object(sha1);
if (!obj) {
@@ -648,11 +648,8 @@ int cmd_fsck(int argc, char **argv, const char *prefix)
for (p = packed_git; p; p = p->next) {
uint32_t i, num = num_packed_objects(p);
- for (i = 0; i < num; i++) {
- unsigned char sha1[20];
- nth_packed_object_sha1(p, i, sha1);
- fsck_sha1(sha1);
- }
+ for (i = 0; i < num; i++)
+ fsck_sha1(nth_packed_object_sha1(p, i));
}
}