diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2018-05-24 19:00:13 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2018-05-24 19:00:13 +0200 |
| commit | 91a4849daf692a062b00b57484aba8b68ae1f481 (patch) | |
| tree | 5b720a901904088769bc656b34084b7148a35c8f /src/submodule.c | |
| parent | 1f570a290aae8bf5a0a5a436e8c66b059b2f0ca1 (diff) | |
| download | libgit2-91a4849daf692a062b00b57484aba8b68ae1f481.tar.gz | |
submodule: the repostiory for _name_is_valid should not be const
We might modify caches due to us trying to load the configuration to figure out
what kinds of filesystem protections we should have.
Diffstat (limited to 'src/submodule.c')
| -rw-r--r-- | src/submodule.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/submodule.c b/src/submodule.c index 0bc580876..75657434a 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -365,7 +365,7 @@ int git_submodule_lookup( return 0; } -int git_submodule_name_is_valid(const git_repository *repo, const char *name, int flags) +int git_submodule_name_is_valid(git_repository *repo, const char *name, int flags) { git_buf buf = GIT_BUF_INIT; int error, isvalid; @@ -381,8 +381,7 @@ int git_submodule_name_is_valid(const git_repository *repo, const char *name, in git_buf_attach_notowned(&buf, name, strlen(name)); } - /* FIXME: Un-consting it to reduce the amount of diff */ - isvalid = git_path_isvalid((git_repository *)repo, buf.ptr, 0, flags); + isvalid = git_path_isvalid(repo, buf.ptr, 0, flags); git_buf_free(&buf); return isvalid; |
