summaryrefslogtreecommitdiff
path: root/line-log.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2016-06-24 23:09:24 +0000
committerJunio C Hamano <gitster@pobox.com>2016-06-28 11:39:02 -0700
commit41c9560ee5f9fc4bd3c6580272bd292083a9fe18 (patch)
tree5dd07bbd754dd1ff28abc083ec509cb3ad1ce0d9 /line-log.c
parenta0d12c4433e25e87b67df78b45635df8a098fb23 (diff)
downloadgit-41c9560ee5f9fc4bd3c6580272bd292083a9fe18.tar.gz
diff: rename struct diff_filespec's sha1_valid member
Now that this struct's sha1 member is called "oid", update the comment and the sha1_valid member to be called "oid_valid" instead. The following Coccinelle semantic patch was used to implement this, followed by the transformations in object_id.cocci: @@ struct diff_filespec o; @@ - o.sha1_valid + o.oid_valid @@ struct diff_filespec *p; @@ - p->sha1_valid + p->oid_valid Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'line-log.c')
-rw-r--r--line-log.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/line-log.c b/line-log.c
index 0293863926..93407baafd 100644
--- a/line-log.c
+++ b/line-log.c
@@ -894,14 +894,14 @@ static void dump_diff_hacky_one(struct rev_info *rev, struct line_log_data *rang
if (!pair || !diff)
return;
- if (pair->one->sha1_valid)
+ if (pair->one->oid_valid)
fill_line_ends(pair->one, &p_lines, &p_ends);
fill_line_ends(pair->two, &t_lines, &t_ends);
printf("%s%sdiff --git a/%s b/%s%s\n", prefix, c_meta, pair->one->path, pair->two->path, c_reset);
printf("%s%s--- %s%s%s\n", prefix, c_meta,
- pair->one->sha1_valid ? "a/" : "",
- pair->one->sha1_valid ? pair->one->path : "/dev/null",
+ pair->one->oid_valid ? "a/" : "",
+ pair->one->oid_valid ? pair->one->path : "/dev/null",
c_reset);
printf("%s%s+++ b/%s%s\n", prefix, c_meta, pair->two->path, c_reset);
for (i = 0; i < range->ranges.nr; i++) {
@@ -1011,12 +1011,12 @@ static int process_diff_filepair(struct rev_info *rev,
if (rg->ranges.nr == 0)
return 0;
- assert(pair->two->sha1_valid);
+ assert(pair->two->oid_valid);
diff_populate_filespec(pair->two, 0);
file_target.ptr = pair->two->data;
file_target.size = pair->two->size;
- if (pair->one->sha1_valid) {
+ if (pair->one->oid_valid) {
diff_populate_filespec(pair->one, 0);
file_parent.ptr = pair->one->data;
file_parent.size = pair->one->size;