summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/cat-file.c4
-rw-r--r--builtin/diff.c2
-rw-r--r--builtin/pack-objects.c4
-rw-r--r--builtin/pull.c2
-rw-r--r--builtin/receive-pack.c6
5 files changed, 9 insertions, 9 deletions
diff --git a/builtin/cat-file.c b/builtin/cat-file.c
index 8b85cb8..8fbb667 100644
--- a/builtin/cat-file.c
+++ b/builtin/cat-file.c
@@ -413,7 +413,7 @@ static int batch_loose_object(const struct object_id *oid,
const char *path,
void *data)
{
- sha1_array_append(data, oid->hash);
+ sha1_array_append(data, oid);
return 0;
}
@@ -422,7 +422,7 @@ static int batch_packed_object(const struct object_id *oid,
uint32_t pos,
void *data)
{
- sha1_array_append(data, oid->hash);
+ sha1_array_append(data, oid);
return 0;
}
diff --git a/builtin/diff.c b/builtin/diff.c
index 398eee0..a5b34eb 100644
--- a/builtin/diff.c
+++ b/builtin/diff.c
@@ -193,7 +193,7 @@ static int builtin_diff_combined(struct rev_info *revs,
if (!revs->dense_combined_merges && !revs->combine_merges)
revs->dense_combined_merges = revs->combine_merges = 1;
for (i = 1; i < ents; i++)
- sha1_array_append(&parents, ent[i].item->oid.hash);
+ sha1_array_append(&parents, &ent[i].item->oid);
diff_tree_combined(ent[0].item->oid.hash, &parents,
revs->dense_combined_merges, revs);
sha1_array_clear(&parents);
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 16517f2..dfeacd5 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -2739,12 +2739,12 @@ static void record_recent_object(struct object *obj,
const char *name,
void *data)
{
- sha1_array_append(&recent_objects, obj->oid.hash);
+ sha1_array_append(&recent_objects, &obj->oid);
}
static void record_recent_commit(struct commit *commit, void *data)
{
- sha1_array_append(&recent_objects, commit->object.oid.hash);
+ sha1_array_append(&recent_objects, &commit->object.oid);
}
static void get_object_list(int ac, const char **av)
diff --git a/builtin/pull.c b/builtin/pull.c
index c007900..183e377 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -344,7 +344,7 @@ static void get_merge_heads(struct sha1_array *merge_heads)
continue; /* invalid line: does not start with SHA1 */
if (starts_with(sb.buf + GIT_SHA1_HEXSZ, "\tnot-for-merge\t"))
continue; /* ref is not-for-merge */
- sha1_array_append(merge_heads, oid.hash);
+ sha1_array_append(merge_heads, &oid);
}
fclose(fp);
strbuf_release(&sb);
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index d6097ee..2853ea0 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;