Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin/fsck: convert remaining caller of get_sha1 to object_id
author
brian m. carlson
<sandals@crustytoothpaste.net>
Thu, 13 Jul 2017 23:49:18 +0000
(23:49 +0000)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 17 Jul 2017 20:54:37 +0000
(13:54 -0700)
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fsck.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
8457176
)
diff --git
a/builtin/fsck.c
b/builtin/fsck.c
index 99dea7adf60a61906500b4aebc6cb7d566339b38..0e5a18e843b6dab11bd952886f00da3804d10dc0 100644
(file)
--- a/
builtin/fsck.c
+++ b/
builtin/fsck.c
@@
-738,12
+738,12
@@
int cmd_fsck(int argc, const char **argv, const char *prefix)
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;
}