summaryrefslogtreecommitdiff
path: root/src/diff_file.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-01-24 20:23:17 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2014-01-25 08:15:44 +0100
commit9950bb4e8de076565976128559ff273e9d4a2a78 (patch)
tree6514d51afd8a447c1cfdf86eece2ae28df2e1fa4 /src/diff_file.c
parentf000ee4e5b840e9f110123a050777fb1301b19bf (diff)
downloadlibgit2-9950bb4e8de076565976128559ff273e9d4a2a78.tar.gz
diff: rename the file's 'oid' to 'id'
In the same vein as the previous commits in this series.
Diffstat (limited to 'src/diff_file.c')
-rw-r--r--src/diff_file.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/diff_file.c b/src/diff_file.c
index a4c8641bc..fb5d674f7 100644
--- a/src/diff_file.c
+++ b/src/diff_file.c
@@ -143,10 +143,10 @@ int git_diff_file_content__init_from_blob(
fc->flags |= GIT_DIFF_FLAG__NO_DATA;
} else {
fc->flags |= GIT_DIFF_FLAG__LOADED;
- fc->file->flags |= GIT_DIFF_FLAG_VALID_OID;
+ fc->file->flags |= GIT_DIFF_FLAG_VALID_ID;
fc->file->size = git_blob_rawsize(blob);
fc->file->mode = GIT_FILEMODE_BLOB;
- git_oid_cpy(&fc->file->oid, git_blob_id(blob));
+ git_oid_cpy(&fc->file->id, git_blob_id(blob));
fc->map.len = (size_t)fc->file->size;
fc->map.data = (char *)git_blob_rawcontent(blob);
@@ -171,10 +171,10 @@ int git_diff_file_content__init_from_raw(
fc->flags |= GIT_DIFF_FLAG__NO_DATA;
} else {
fc->flags |= GIT_DIFF_FLAG__LOADED;
- fc->file->flags |= GIT_DIFF_FLAG_VALID_OID;
+ fc->file->flags |= GIT_DIFF_FLAG_VALID_ID;
fc->file->size = buflen;
fc->file->mode = GIT_FILEMODE_BLOB;
- git_odb_hash(&fc->file->oid, buf, buflen, GIT_OBJ_BLOB);
+ git_odb_hash(&fc->file->id, buf, buflen, GIT_OBJ_BLOB);
fc->map.len = buflen;
fc->map.data = (char *)buf;
@@ -205,19 +205,19 @@ static int diff_file_content_commit_to_str(
}
/* update OID if we didn't have it previously */
- if ((fc->file->flags & GIT_DIFF_FLAG_VALID_OID) == 0 &&
+ if ((fc->file->flags & GIT_DIFF_FLAG_VALID_ID) == 0 &&
((sm_head = git_submodule_wd_id(sm)) != NULL ||
(sm_head = git_submodule_head_id(sm)) != NULL))
{
- git_oid_cpy(&fc->file->oid, sm_head);
- fc->file->flags |= GIT_DIFF_FLAG_VALID_OID;
+ git_oid_cpy(&fc->file->id, sm_head);
+ fc->file->flags |= GIT_DIFF_FLAG_VALID_ID;
}
if (GIT_SUBMODULE_STATUS_IS_WD_DIRTY(sm_status))
status = "-dirty";
}
- git_oid_tostr(oid, sizeof(oid), &fc->file->oid);
+ git_oid_tostr(oid, sizeof(oid), &fc->file->id);
if (git_buf_printf(&content, "Subproject commit %s%s\n", oid, status) < 0)
return -1;
@@ -233,7 +233,7 @@ static int diff_file_content_load_blob(git_diff_file_content *fc)
int error = 0;
git_odb_object *odb_obj = NULL;
- if (git_oid_iszero(&fc->file->oid))
+ if (git_oid_iszero(&fc->file->id))
return 0;
if (fc->file->mode == GIT_FILEMODE_COMMIT)
@@ -255,7 +255,7 @@ static int diff_file_content_load_blob(git_diff_file_content *fc)
git_odb_object_free(odb_obj);
} else {
error = git_blob_lookup(
- (git_blob **)&fc->blob, fc->repo, &fc->file->oid);
+ (git_blob **)&fc->blob, fc->repo, &fc->file->id);
}
if (!error) {
@@ -368,10 +368,10 @@ static int diff_file_content_load_workdir(git_diff_file_content *fc)
error = diff_file_content_load_workdir_file(fc, &path);
/* once data is loaded, update OID if we didn't have it previously */
- if (!error && (fc->file->flags & GIT_DIFF_FLAG_VALID_OID) == 0) {
+ if (!error && (fc->file->flags & GIT_DIFF_FLAG_VALID_ID) == 0) {
error = git_odb_hash(
- &fc->file->oid, fc->map.data, fc->map.len, GIT_OBJ_BLOB);
- fc->file->flags |= GIT_DIFF_FLAG_VALID_OID;
+ &fc->file->id, fc->map.data, fc->map.len, GIT_OBJ_BLOB);
+ fc->file->flags |= GIT_DIFF_FLAG_VALID_ID;
}
git_buf_free(&path);