summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-03-31 01:39:56 +0000
committerJunio C Hamano <gitster@pobox.com>2017-03-31 08:33:55 -0700
commit98a72ddc12e13231537150607f4a6a8ff8b43854 (patch)
treeb519703af87417aa54f59f80f1a2d6d9ff7f7a8c /builtin/receive-pack.c
parentee3051bd2307cdc0145aa9ed9dcacb8acfc08c40 (diff)
downloadgit-98a72ddc12e13231537150607f4a6a8ff8b43854.tar.gz
Make sha1_array_append take a struct object_id *
Convert the callers to pass struct object_id by changing the function declaration and definition and applying the following semantic patch: @@ expression E1, E2; @@ - sha1_array_append(E1, E2.hash) + sha1_array_append(E1, &E2) @@ expression E1, E2; @@ - sha1_array_append(E1, E2->hash) + sha1_array_append(E1, E2) Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index d6097ee08c..2853ea0f99 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -842,7 +842,7 @@ static int update_shallow_ref(struct command *cmd, struct shallow_info *si)
if (si->used_shallow[i] &&
(si->used_shallow[i][cmd->index / 32] & mask) &&
!delayed_reachability_test(si, i))
- sha1_array_append(&extra, si->shallow->oid[i].hash);
+ sha1_array_append(&extra, &si->shallow->oid[i]);
opt.env = tmp_objdir_env(tmp_objdir);
setup_alternate_shallow(&shallow_lock, &opt.shallow_file, &extra);
@@ -1546,7 +1546,7 @@ static struct command *read_head_info(struct sha1_array *shallow)
if (get_oid_hex(line + 8, &oid))
die("protocol error: expected shallow sha, got '%s'",
line + 8);
- sha1_array_append(shallow, oid.hash);
+ sha1_array_append(shallow, &oid);
continue;
}
@@ -1817,7 +1817,7 @@ static void update_shallow_info(struct command *commands,
for (cmd = commands; cmd; cmd = cmd->next) {
if (is_null_oid(&cmd->new_oid))
continue;
- sha1_array_append(ref, cmd->new_oid.hash);
+ sha1_array_append(ref, &cmd->new_oid);
cmd->index = ref->nr - 1;
}
si->ref = ref;