diff options
Diffstat (limited to 'builtin/rev-parse.c')
| -rw-r--r-- | builtin/rev-parse.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index 4285dc34a7..34b4675442 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -19,6 +19,8 @@ #include "path.h" #include "diff.h" #include "read-cache-ll.h" +#include "repo-settings.h" +#include "repository.h" #include "revision.h" #include "setup.h" #include "split-index.h" @@ -898,7 +900,8 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) } if (opt_with_value(arg, "--abbrev-ref", &arg)) { abbrev_ref = 1; - abbrev_ref_strict = warn_ambiguous_refs; + abbrev_ref_strict = + repo_settings_get_warn_ambiguous_refs(the_repository); if (arg) { if (!strcmp(arg, "strict")) abbrev_ref_strict = 1; @@ -966,7 +969,7 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) continue; } if (!strcmp(arg, "--show-toplevel")) { - const char *work_tree = get_git_work_tree(); + const char *work_tree = repo_get_work_tree(the_repository); if (work_tree) print_path(work_tree, prefix, format, DEFAULT_UNMODIFIED); else @@ -991,7 +994,7 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) const char *pfx = prefix; if (!is_inside_work_tree()) { const char *work_tree = - get_git_work_tree(); + repo_get_work_tree(the_repository); if (work_tree) printf("%s\n", work_tree); continue; @@ -1042,7 +1045,7 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix) continue; } if (!strcmp(arg, "--git-common-dir")) { - print_path(get_git_common_dir(), prefix, format, DEFAULT_RELATIVE_IF_SHARED); + print_path(repo_get_common_dir(the_repository), prefix, format, DEFAULT_RELATIVE_IF_SHARED); continue; } if (!strcmp(arg, "--is-inside-git-dir")) { |
