aboutsummaryrefslogtreecommitdiff
path: root/fetch-pack.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-05-06 22:10:06 +0000
committerJunio C Hamano <gitster@pobox.com>2017-05-08 15:12:57 +0900
commite92b848cb6a77172d2fbd2bda39a32e371d40eea (patch)
tree57161abfe9d8b50f2c4af07fd0bb363444eccd75 /fetch-pack.c
parent68ab61dd099a2ce9f700fa68b9b7cc7722304407 (diff)
downloadgit-e92b848cb6a77172d2fbd2bda39a32e371d40eea.tar.gz
git-e92b848cb6a77172d2fbd2bda39a32e371d40eea.tar.xz
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>
Diffstat (limited to 'fetch-pack.c')
-rw-r--r--fetch-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fetch-pack.c b/fetch-pack.c
index b42d01f42..d455ef97a 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -417,7 +417,7 @@ static int find_common(struct fetch_pack_args *args,
if (skip_prefix(line, "shallow ", &arg)) {
if (get_oid_hex(arg, &oid))
die(_("invalid shallow line: %s"), line);
- register_shallow(oid.hash);
+ register_shallow(&oid);
continue;
}
if (skip_prefix(line, "unshallow ", &arg)) {
@@ -428,7 +428,7 @@ static int find_common(struct fetch_pack_args *args,
/* make sure that it is parsed as shallow */
if (!parse_object(oid.hash))
die(_("error in object: %s"), line);
- if (unregister_shallow(oid.hash))
+ if (unregister_shallow(&oid))
die(_("no shallow found: %s"), line);
continue;
}