Convert remaining callers of get_sha1 to get_oid.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson committed
Jul 13, 2017 at 23:49 UTC
15be4a5d38c3a4408df956845e4c7a8b23920459
2 files changed
+5
-5
builtin/receive-pack.c
+2
-2
@@ -919,9 +919,9 @@ static int update_shallow_ref(struct command *cmd, struct shallow_info *si)
919
*/
920
static int head_has_history(void)
921
{
922
- unsigned char sha1[20];
922
+ struct object_id oid;
923
924
- return !get_sha1("HEAD", sha1);
924
+ return !get_oid("HEAD", &oid);
925
}
926
927
static const char *push_to_deploy(unsigned char *sha1,
mailmap.c
+3
-3
@@ -214,17 +214,17 @@ static int read_mailmap_blob(struct string_list *map,
214
const char *name,
215
char **repo_abbrev)
216
{
217
- unsigned char sha1[20];
217
+ struct object_id oid;
218
char *buf;
219
unsigned long size;
220
enum object_type type;
221
222
if (!name)
223
return 0;
224
- if (get_sha1(name, sha1) < 0)
224
+ if (get_oid(name, &oid) < 0)
225
return 0;
226
227
- buf = read_sha1_file(sha1, &type, &size);
227
+ buf = read_sha1_file(oid.hash, &type, &size);
228
if (!buf)
229
return error("unable to read mailmap object at %s", name);
230
if (type != OBJ_BLOB)