Commit d89b8b60d1ac49f0147c18db1ce935bf6155ff45

Russell Belfer 2013-09-24T09:30:02

Merge pull request #1867 from ethomson/remove_not_delete 'del' instead of 'delete' for the poor C++ users

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;