summaryrefslogtreecommitdiff
path: root/builtin/branch.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/branch.c')
-rw-r--r--builtin/branch.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index 6e7b0cfddb..fa5ced452e 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -473,7 +473,7 @@ static void print_ref_list(struct ref_filter *filter, struct ref_sorting *sortin
if (verify_ref_format(format))
die(_("unable to parse format string"));
- filter_ahead_behind(the_repository, format, &array);
+ filter_ahead_behind(the_repository, &array);
ref_array_sort(sorting, &array);
if (column_active(colopts)) {
@@ -699,7 +699,7 @@ static int edit_branch_description(const char *branch_name)
strbuf_addf(&name, "branch.%s.description", branch_name);
if (buf.len || exists)
- git_config_set(name.buf, buf.len ? buf.buf : NULL);
+ repo_config_set(the_repository, name.buf, buf.len ? buf.buf : NULL);
strbuf_release(&name);
strbuf_release(&buf);
@@ -784,14 +784,14 @@ int cmd_branch(int argc,
filter.kind = FILTER_REFS_BRANCHES;
filter.abbrev = -1;
- if (argc == 2 && !strcmp(argv[1], "-h"))
- usage_with_options(builtin_branch_usage, options);
+ show_usage_with_options_if_asked(argc, argv,
+ builtin_branch_usage, options);
/*
* Try to set sort keys from config. If config does not set any,
* fall back on default (refname) sorting.
*/
- git_config(git_branch_config, &sorting_options);
+ repo_config(the_repository, git_branch_config, &sorting_options);
if (!sorting_options.nr)
string_list_append(&sorting_options, "refname");
@@ -884,7 +884,6 @@ int cmd_branch(int argc,
string_list_clear(&output, 0);
ref_sorting_release(sorting);
ref_filter_clear(&filter);
- ref_format_clear(&format);
ret = 0;
goto out;
@@ -988,10 +987,10 @@ int cmd_branch(int argc,
strbuf_reset(&buf);
strbuf_addf(&buf, "branch.%s.remote", branch->name);
- git_config_set_multivar(buf.buf, NULL, NULL, CONFIG_FLAGS_MULTI_REPLACE);
+ repo_config_set_multivar(the_repository, buf.buf, NULL, NULL, CONFIG_FLAGS_MULTI_REPLACE);
strbuf_reset(&buf);
strbuf_addf(&buf, "branch.%s.merge", branch->name);
- git_config_set_multivar(buf.buf, NULL, NULL, CONFIG_FLAGS_MULTI_REPLACE);
+ repo_config_set_multivar(the_repository, buf.buf, NULL, NULL, CONFIG_FLAGS_MULTI_REPLACE);
strbuf_release(&buf);
} else if (!noncreate_actions && argc > 0 && argc <= 2) {
const char *branch_name = argv[0];