summaryrefslogtreecommitdiff
path: root/src/status.c
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-03-04 23:28:36 -0800
committerRussell Belfer <rb@github.com>2012-05-02 15:34:58 -0700
commit16b83019af63d837b6934bcf1b71b8697d5d94c8 (patch)
tree09f9ca31b329fc630629d11aa097e6563f1904b5 /src/status.c
parentb88021463f9ca4ebffe8e2a5b15d4b09be465923 (diff)
downloadlibgit2-16b83019af63d837b6934bcf1b71b8697d5d94c8.tar.gz
Fix usage of "new" for fieldname in public header
This should restore the ability to include libgit2 headers in C++ projects. Cherry picked 2de60205dfea2c4a422b2108a5e8605f97c2e895 from development into new-error-handling.
Diffstat (limited to 'src/status.c')
-rw-r--r--src/status.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/status.c b/src/status.c
index 62cc37e2e..356cbeb98 100644
--- a/src/status.c
+++ b/src/status.c
@@ -150,7 +150,7 @@ int git_status_foreach_ext(
if (show == GIT_STATUS_SHOW_INDEX_THEN_WORKDIR) {
for (i = 0; !err && i < idx2head->deltas.length; i++) {
i2h = GIT_VECTOR_GET(&idx2head->deltas, i);
- err = cb(i2h->old.path, index_delta2status(i2h->status), cbdata);
+ err = cb(i2h->old_file.path, index_delta2status(i2h->status), cbdata);
}
git_diff_list_free(idx2head);
idx2head = NULL;
@@ -163,16 +163,16 @@ int git_status_foreach_ext(
i2h = idx2head ? GIT_VECTOR_GET(&idx2head->deltas,i) : NULL;
w2i = wd2idx ? GIT_VECTOR_GET(&wd2idx->deltas,j) : NULL;
- cmp = !w2i ? -1 : !i2h ? 1 : strcmp(i2h->old.path, w2i->old.path);
+ cmp = !w2i ? -1 : !i2h ? 1 : strcmp(i2h->old_file.path, w2i->old_file.path);
if (cmp < 0) {
- err = cb(i2h->old.path, index_delta2status(i2h->status), cbdata);
+ err = cb(i2h->old_file.path, index_delta2status(i2h->status), cbdata);
i++;
} else if (cmp > 0) {
- err = cb(w2i->old.path, workdir_delta2status(w2i->status), cbdata);
+ err = cb(w2i->old_file.path, workdir_delta2status(w2i->status), cbdata);
j++;
} else {
- err = cb(i2h->old.path, index_delta2status(i2h->status) |
+ err = cb(i2h->old_file.path, index_delta2status(i2h->status) |
workdir_delta2status(w2i->status), cbdata);
i++; j++;
}