summaryrefslogtreecommitdiff
path: root/shallow.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-03-31 01:40:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-31 15:33:56 (GMT)
commit910650d2f8755359ab7b1f0e2a2d576c06a68091 (patch)
treec0ebaef3c66710ea08e1c766ec1553f0105fcc21 /shallow.c
parent1b7ba794d21836f72e5888db63ab790077c04e1b (diff)
downloadgit-910650d2f8755359ab7b1f0e2a2d576c06a68091.zip
git-910650d2f8755359ab7b1f0e2a2d576c06a68091.tar.gz
git-910650d2f8755359ab7b1f0e2a2d576c06a68091.tar.bz2
Rename sha1_array to oid_array
Since this structure handles an array of object IDs, rename it to struct oid_array. Also rename the accessor functions and the initialization constant. This commit was produced mechanically by providing non-Documentation files to the following Perl one-liners: perl -pi -E 's/struct sha1_array/struct oid_array/g' perl -pi -E 's/\bsha1_array_/oid_array_/g' perl -pi -E 's/SHA1_ARRAY_INIT/OID_ARRAY_INIT/g' Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'shallow.c')
-rw-r--r--shallow.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/shallow.c b/shallow.c
index dc7b67a..25b6db9 100644
--- a/shallow.c
+++ b/shallow.c
@@ -260,7 +260,7 @@ static int write_one_shallow(const struct commit_graft *graft, void *cb_data)
}
static int write_shallow_commits_1(struct strbuf *out, int use_pack_protocol,
- const struct sha1_array *extra,
+ const struct oid_array *extra,
unsigned flags)
{
struct write_shallow_data data;
@@ -281,14 +281,14 @@ static int write_shallow_commits_1(struct strbuf *out, int use_pack_protocol,
}
int write_shallow_commits(struct strbuf *out, int use_pack_protocol,
- const struct sha1_array *extra)
+ const struct oid_array *extra)
{
return write_shallow_commits_1(out, use_pack_protocol, extra, 0);
}
static struct tempfile temporary_shallow;
-const char *setup_temporary_shallow(const struct sha1_array *extra)
+const char *setup_temporary_shallow(const struct oid_array *extra)
{
struct strbuf sb = STRBUF_INIT;
int fd;
@@ -312,7 +312,7 @@ const char *setup_temporary_shallow(const struct sha1_array *extra)
void setup_alternate_shallow(struct lock_file *shallow_lock,
const char **alternate_shallow_file,
- const struct sha1_array *extra)
+ const struct oid_array *extra)
{
struct strbuf sb = STRBUF_INIT;
int fd;
@@ -385,7 +385,7 @@ struct trace_key trace_shallow = TRACE_KEY_INIT(SHALLOW);
* Step 1, split sender shallow commits into "ours" and "theirs"
* Step 2, clean "ours" based on .git/shallow
*/
-void prepare_shallow_info(struct shallow_info *info, struct sha1_array *sa)
+void prepare_shallow_info(struct shallow_info *info, struct oid_array *sa)
{
int i;
trace_printf_key(&trace_shallow, "shallow: prepare_shallow_info\n");
@@ -560,7 +560,7 @@ void assign_shallow_commits_to_refs(struct shallow_info *info,
uint32_t **used, int *ref_status)
{
struct object_id *oid = info->shallow->oid;
- struct sha1_array *ref = info->ref;
+ struct oid_array *ref = info->ref;
unsigned int i, nr;
int *shallow, nr_shallow = 0;
struct paint_info pi;