diff options
| author | Patrick Steinhardt <ps@pks.im> | 2015-03-12 16:05:07 +0100 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2015-03-12 16:05:07 +0100 |
| commit | e6903ea278c43895cce234bb956b31570b4bbb07 (patch) | |
| tree | eba3fe7e0d518b256079de91856052911d992134 /src/submodule.c | |
| parent | 15f581747c57f1bb5f3c3a173139789ec759c964 (diff) | |
| download | libgit2-e6903ea278c43895cce234bb956b31570b4bbb07.tar.gz | |
Fix git_submodule_sync writing URL to wrong key.
Currently git_submodule_sync writes the submodule's URL to the
key 'branch.<REMOTE_NAME>.remote' while the reference
implementation of `git submodule sync` writes to
'remote.<REMOTE_NAME>.url', which is the intended behavior
according to git-submodule(1).
Diffstat (limited to 'src/submodule.c')
| -rw-r--r-- | src/submodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/submodule.c b/src/submodule.c index 567ab748e..c3bb6fe0e 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -1091,10 +1091,10 @@ int git_submodule_sync(git_submodule *sm) /* return error from reading submodule config */; else if ((error = lookup_head_remote_key(&remote_name, smrepo)) < 0) { giterr_clear(); - error = git_buf_sets(&key, "branch.origin.remote"); + error = git_buf_sets(&key, "remote.origin.url"); } else { error = git_buf_join3( - &key, '.', "branch", remote_name.ptr, "remote"); + &key, '.', "remote", remote_name.ptr, "url"); git_buf_free(&remote_name); } |
