diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2017-05-07 00:10:14 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-05-08 08:12:57 +0200 |
commit | 3aca1fc6c9c69fbfce0e6312fc8e3087cb6334a4 (patch) | |
tree | 659abe824d500138947540b5217d142cac1a75f0 /builtin | |
parent | Convert remaining callers of lookup_blob to object_id (diff) | |
download | git-3aca1fc6c9c69fbfce0e6312fc8e3087cb6334a4.tar.xz git-3aca1fc6c9c69fbfce0e6312fc8e3087cb6334a4.zip |
Convert lookup_blob to struct object_id
Convert lookup_blob to take a pointer to struct object_id.
The commit was created with manual changes to blob.c and blob.h, plus
the following semantic patch:
@@
expression E1;
@@
- lookup_blob(E1.hash)
+ lookup_blob(&E1)
@@
expression E1;
@@
- lookup_blob(E1->hash)
+ lookup_blob(E1)
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fast-export.c | 2 | ||||
-rw-r--r-- | builtin/fsck.c | 2 | ||||
-rw-r--r-- | builtin/index-pack.c | 2 | ||||
-rw-r--r-- | builtin/merge-tree.c | 2 | ||||
-rw-r--r-- | builtin/unpack-objects.c | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/builtin/fast-export.c b/builtin/fast-export.c index b4521cb627..ae36b14db7 100644 --- a/builtin/fast-export.c +++ b/builtin/fast-export.c @@ -232,7 +232,7 @@ static void export_blob(const struct object_id *oid) if (anonymize) { buf = anonymize_blob(&size); - object = (struct object *)lookup_blob(oid->hash); + object = (struct object *)lookup_blob(oid); eaten = 0; } else { buf = read_sha1_file(oid->hash, &type, &size); diff --git a/builtin/fsck.c b/builtin/fsck.c index c40e14de65..2f67e8217e 100644 --- a/builtin/fsck.c +++ b/builtin/fsck.c @@ -781,7 +781,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix) mode = active_cache[i]->ce_mode; if (S_ISGITLINK(mode)) continue; - blob = lookup_blob(active_cache[i]->oid.hash); + blob = lookup_blob(&active_cache[i]->oid); if (!blob) continue; obj = &blob->object; diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 2241ee68ed..b75133f625 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -829,7 +829,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry, if (strict) { read_lock(); if (type == OBJ_BLOB) { - struct blob *blob = lookup_blob(oid->hash); + struct blob *blob = lookup_blob(oid); if (blob) blob->object.flags |= FLAG_CHECKED; else diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index cdeb6562da..bad6735c76 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-tree.c @@ -168,7 +168,7 @@ static struct merge_list *create_entry(unsigned stage, unsigned mode, const stru res->stage = stage; res->path = path; res->mode = mode; - res->blob = lookup_blob(oid->hash); + res->blob = lookup_blob(oid); return res; } diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index 3dc5e56918..7d5efa2b3b 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -249,7 +249,7 @@ static void write_object(unsigned nr, enum object_type type, added_object(nr, type, buf, size); free(buf); - blob = lookup_blob(obj_list[nr].oid.hash); + blob = lookup_blob(&obj_list[nr].oid); if (blob) blob->object.flags |= FLAG_WRITTEN; else |