summaryrefslogtreecommitdiff
path: root/builtin-repo-config.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-12-19 01:38:18 -0800
committerJunio C Hamano <junkio@cox.net>2006-12-19 01:38:18 -0800
commit5fed4668153c9ca6e44ec84a0976089f515705aa (patch)
tree82f3ce0d2ea76ca31cebd3a5b40d0993e019859a /builtin-repo-config.c
parent63085fabbdeaad9eb8b29d39d0998c704e6cd232 (diff)
parent8683a45d66967b0969516a2b72cdbf136c2064a2 (diff)
downloadgit-5fed4668153c9ca6e44ec84a0976089f515705aa.tar.gz
Merge branch 'jc/test-clone' into jc/clone
* jc/test-clone: (35 commits) Introduce GIT_TEMPLATE_DIR Revert "fix testsuite: make sure they use templates freshly built from the source" fix testsuite: make sure they use templates freshly built from the source rerere: fix breakage of resolving. Add config example with respect to branch Add documentation for show-branch --topics make git a bit less cryptic on fetch errors make patch_delta() error cases a bit more verbose racy-git: documentation updates. show-ref: fix --exclude-existing parse-remote::expand_refs_wildcard() vim syntax: follow recent changes to commit template show-ref: fix --verify --hash=length show-ref: fix --quiet --verify avoid accessing _all_ loose refs in git-show-ref --verify git-fetch: Avoid reading packed refs over and over again Teach show-branch how to show ref-log data. markup fix in svnimport documentation. Documentation: new option -P for git-svnimport Fix mis-mark-up in git-merge-file.txt documentation ...
Diffstat (limited to 'builtin-repo-config.c')
-rw-r--r--builtin-repo-config.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/builtin-repo-config.c b/builtin-repo-config.c
index 64fbdb7b24..a38099a63d 100644
--- a/builtin-repo-config.c
+++ b/builtin-repo-config.c
@@ -3,7 +3,7 @@
#include <regex.h>
static const char git_config_set_usage[] =
-"git-repo-config [ --global ] [ --bool | --int ] [--get | --get-all | --get-regexp | --replace-all | --add | --unset | --unset-all] name [value [value_regex]] | --list";
+"git-repo-config [ --global ] [ --bool | --int ] [--get | --get-all | --get-regexp | --replace-all | --add | --unset | --unset-all] name [value [value_regex]] | --rename-section old_name new_name | --list";
static char *key;
static regex_t *key_regexp;
@@ -148,6 +148,18 @@ int cmd_repo_config(int argc, const char **argv, const char *prefix)
} else {
die("$HOME not set");
}
+ } else if (!strcmp(argv[1], "--rename-section")) {
+ int ret;
+ if (argc != 4)
+ usage(git_config_set_usage);
+ ret = git_config_rename_section(argv[2], argv[3]);
+ if (ret < 0)
+ return ret;
+ if (ret == 0) {
+ fprintf(stderr, "No such section!\n");
+ return 1;
+ }
+ return 0;
} else
break;
argc--;