Merge branch 'js/remote-rename-with-half-configured-remote'
With anticipatory tweaking for remotes defined in ~/.gitconfig (e.g. "remote.origin.prune" set to true, even though there may or may not actually be "origin" remote defined in a particular Git repository), "git remote rename" and other commands misinterpreted and behaved as if such a non-existing remote actually existed. * js/remote-rename-with-half-configured-remote: remote rename: more carefully determine whether a remote is configured remote rename: demonstrate a bogus "remote exists" bug
This commit is contained in:
@ -1177,7 +1177,7 @@ static int add_remote_or_group(const char *name, struct string_list *list)
|
||||
git_config(get_remote_group, &g);
|
||||
if (list->nr == prev_nr) {
|
||||
struct remote *remote = remote_get(name);
|
||||
if (!remote_is_configured(remote))
|
||||
if (!remote_is_configured(remote, 0))
|
||||
return 0;
|
||||
string_list_append(list, remote->name);
|
||||
}
|
||||
|
Reference in New Issue
Block a user