shallow: convert shallow registration functions to object_id
Convert register_shallow and unregister_shallow to take struct object_id. register_shallow is a caller of lookup_commit, which we will convert later. It doesn't make sense for the registration and unregistration functions to have incompatible interfaces, so convert them both. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
68ab61dd09
commit
e92b848cb6
@ -2777,10 +2777,10 @@ static void get_object_list(int ac, const char **av)
|
||||
continue;
|
||||
}
|
||||
if (starts_with(line, "--shallow ")) {
|
||||
unsigned char sha1[20];
|
||||
if (get_sha1_hex(line + 10, sha1))
|
||||
struct object_id oid;
|
||||
if (get_oid_hex(line + 10, &oid))
|
||||
die("not an SHA-1 '%s'", line + 10);
|
||||
register_shallow(sha1);
|
||||
register_shallow(&oid);
|
||||
use_bitmap_index = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user