Merge pull request #1867 from ethomson/remove_not_delete 'del' instead of 'delete' for the poor C++ users
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/include/git2/sys/refdb_backend.h b/include/git2/sys/refdb_backend.h
index 9b457b0..e0a24f4 100644
--- a/include/git2/sys/refdb_backend.h
+++ b/include/git2/sys/refdb_backend.h
@@ -103,7 +103,7 @@ struct git_refdb_backend {
* Deletes the given reference from the refdb. A refdb implementation
* must provide this function.
*/
- int (*delete)(git_refdb_backend *backend, const char *ref_name);
+ int (*del)(git_refdb_backend *backend, const char *ref_name);
/**
* Suggests that the given refdb compress or optimize its references.
diff --git a/src/refdb.c b/src/refdb.c
index 4de7188..7df61a5 100644
--- a/src/refdb.c
+++ b/src/refdb.c
@@ -201,5 +201,5 @@ int git_refdb_rename(
int git_refdb_delete(struct git_refdb *db, const char *ref_name)
{
assert(db && db->backend);
- return db->backend->delete(db->backend, ref_name);
+ return db->backend->del(db->backend, ref_name);
}
diff --git a/src/refdb_fs.c b/src/refdb_fs.c
index 894ff7c..0ba711e 100644
--- a/src/refdb_fs.c
+++ b/src/refdb_fs.c
@@ -1096,7 +1096,7 @@ int git_refdb_backend_fs(
backend->parent.lookup = &refdb_fs_backend__lookup;
backend->parent.iterator = &refdb_fs_backend__iterator;
backend->parent.write = &refdb_fs_backend__write;
- backend->parent.delete = &refdb_fs_backend__delete;
+ backend->parent.del = &refdb_fs_backend__delete;
backend->parent.rename = &refdb_fs_backend__rename;
backend->parent.compress = &refdb_fs_backend__compress;
backend->parent.free = &refdb_fs_backend__free;