]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'hn/url-push-tracking' into jch
authorJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2026 17:40:40 +0000 (10:40 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2026 17:40:40 +0000 (10:40 -0700)
When the push remote is specified as a URL, the fetch refspec of a
uniquely matching configured remote is now used to find and update
the remote-tracking branch (e.g., '@{push}').

* hn/url-push-tracking:
  remote: find tracking branches for URL push destinations
  remote: pass repository to push tracking helper

1  2 
remote.c
t/t5505-remote.sh
transport.c

diff --cc remote.c
index b55fc6e18a487f96abedb1407eed6cd46ead6a28,3a6abf125899994bd42e5970415f0943af10dea8..a13d9a0903e190721c19716c4d6778acc7abf33e
+++ b/remote.c
@@@ -1931,9 -1975,9 +1975,9 @@@ static char *branch_get_push_1(struct r
        }
  
        if (remote->mirror)
-               return tracking_for_push_dest(remote, branch->refname, err);
+               return tracking_for_push_dest(repo, remote, branch->refname, err);
  
 -      switch (push_default) {
 +      switch (repo_config_values(repo)->push_default) {
        case PUSH_DEFAULT_NOTHING:
                return error_buf(err, _("push has no destination (push.default is 'nothing')"));
  
Simple merge
diff --cc transport.c
Simple merge