Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jt/fsck-code-cleanup'
author
Junio C Hamano
<gitster@pobox.com>
Fri, 11 Aug 2017 20:26:59 +0000
(13:26 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 11 Aug 2017 20:27:00 +0000
(13:27 -0700)
Code clean-up.
* jt/fsck-code-cleanup:
fsck: cleanup unused variable
object: remove "used" field from struct object
fsck: remove redundant parse_tree() invocation
1
2
builtin/fsck.c
patch
|
diff1
|
diff2
|
blob
|
history
raw
|
combined
(merge:
17b1e1d
78e7b98
)
diff --cc
builtin/fsck.c
index 0e5a18e843b6dab11bd952886f00da3804d10dc0,64542ac3dea48e3a92901319233aa3a1e0c4cb9a..a92f44818610784091f8aac5ea14612be59cd184
---
1
/
builtin/fsck.c
---
2
/
builtin/fsck.c
+++ b/
builtin/fsck.c
@@@
-735,15
-728,14
+728,14
@@@
int cmd_fsck(int argc, const char **arg
}
}
- heads = 0;
for (i = 0; i < argc; i++) {
const char *arg = argv[i];
-
unsigned char sha1[20]
;
- if (!get_
sha1(arg, sha1
)) {
- struct object *obj = lookup_object(
sha1
);
+
struct object_id oid
;
+ if (!get_
oid(arg, &oid
)) {
+ struct object *obj = lookup_object(
oid.hash
);
if (!obj || !(obj->flags & HAS_OBJ)) {
- error("%s: object missing",
sha1_to_hex(sha1
));
+ error("%s: object missing",
oid_to_hex(&oid
));
errors_found |= ERROR_OBJECT;
continue;
}