summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-07-12 02:38:20 +0200
committerVicent Marti <tanoku@gmail.com>2011-07-12 02:38:20 +0200
commitb08683ffb2146bb164108a525a9f0a9972f7ed8b (patch)
treebecd64ac184e4954a63760e76eb30bc3032d2848
parentbfbb55628bee994b649117e787bc40749f4c5181 (diff)
downloadlibgit2-b08683ffb2146bb164108a525a9f0a9972f7ed8b.tar.gz
config: Rename `del` to `delete
-rw-r--r--include/git2/config.h2
-rw-r--r--src/config.c2
-rw-r--r--tests/t15-config.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/include/git2/config.h b/include/git2/config.h
index a8bff6cf0..e05d23694 100644
--- a/include/git2/config.h
+++ b/include/git2/config.h
@@ -259,7 +259,7 @@ GIT_EXTERN(int) git_config_set_string(git_config *cfg, const char *name, const c
* @param cfg the configuration
* @param name the variable to delete
*/
-GIT_EXTERN(int) git_config_del(git_config *cfg, const char *name);
+GIT_EXTERN(int) git_config_delete(git_config *cfg, const char *name);
/**
* Perform an operation on each config variable.
diff --git a/src/config.c b/src/config.c
index 815b08c55..c48376f7c 100644
--- a/src/config.c
+++ b/src/config.c
@@ -167,7 +167,7 @@ int git_config_foreach(git_config *cfg, int (*fn)(const char *, const char *, vo
return ret;
}
-int git_config_del(git_config *cfg, const char *name)
+int git_config_delete(git_config *cfg, const char *name)
{
return git_config_set_string(cfg, name, NULL);
}
diff --git a/tests/t15-config.c b/tests/t15-config.c
index cb1b0f372..aa5ba28f6 100644
--- a/tests/t15-config.c
+++ b/tests/t15-config.c
@@ -246,7 +246,7 @@ BEGIN_TEST(config12, "delete a value")
git_config_free(cfg);
must_pass(git_config_open_ondisk(&cfg, CONFIG_BASE "/config9"));
- must_pass(git_config_del(cfg, "core.dummy"));
+ must_pass(git_config_delete(cfg, "core.dummy"));
git_config_free(cfg);
must_pass(git_config_open_ondisk(&cfg, CONFIG_BASE "/config9"));
@@ -260,7 +260,7 @@ BEGIN_TEST(config13, "can't delete a non-existent value")
/* By freeing the config, we make sure we flush the values */
must_pass(git_config_open_ondisk(&cfg, CONFIG_BASE "/config9"));
- must_be_true(git_config_del(cfg, "core.imaginary") == GIT_ENOTFOUND);
+ must_be_true(git_config_delete(cfg, "core.imaginary") == GIT_ENOTFOUND);
git_config_free(cfg);
END_TEST
@@ -281,7 +281,7 @@ BEGIN_TEST(config15, "add a variable in an existing section")
must_pass(git_config_set_int(cfg, "empty.tmp", 5));
must_pass(git_config_get_int(cfg, "empty.tmp", &i));
must_be_true(i == 5);
- must_pass(git_config_del(cfg, "empty.tmp"));
+ must_pass(git_config_delete(cfg, "empty.tmp"));
git_config_free(cfg);
END_TEST
@@ -295,7 +295,7 @@ BEGIN_TEST(config16, "add a variable in a new section")
must_pass(git_config_set_int(cfg, "section.tmp", 5));
must_pass(git_config_get_int(cfg, "section.tmp", &i));
must_be_true(i == 5);
- must_pass(git_config_del(cfg, "section.tmp"));
+ must_pass(git_config_delete(cfg, "section.tmp"));
git_config_free(cfg);
/* As the section wasn't removed, owerwrite the file */