t5516 (fetch-push): update test description
[gitweb.git] / remote.c
index 57f36e14da7a8a33ae8c02a4bf46492936c79fdd..34ddc5b8d8731cf31103df03faccc9b821fe4acc 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -357,9 +357,8 @@ static int handle_config(const char *key, const char *value, void *cb)
                        return 0;
                branch = make_branch(name, subkey - name);
                if (!strcmp(subkey, ".remote")) {
-                       if (!value)
-                               return config_error_nonbool(key);
-                       branch->remote_name = xstrdup(value);
+                       if (git_config_string(&branch->remote_name, key, value))
+                               return -1;
                        if (branch == current_branch) {
                                default_remote_name = branch->remote_name;
                                explicit_default_remote_name = 1;
@@ -1322,9 +1321,6 @@ int match_push_refs(struct ref *src, struct ref **dst,
                const struct refspec *pat = NULL;
                char *dst_name;
 
-               if (ref->peer_ref)
-                       continue;
-
                dst_name = get_ref_match(rs, nr_refspec, ref, send_mirror, FROM_SRC, &pat);
                if (!dst_name)
                        continue;