public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: Jack Nagel <jacknagel@gmail•com>,
	Ramkumar Ramachandra <artagnon@gmail•com>,
	git@vger•kernel.org
Subject: Re: [PATCH] remote: handle pushremote config in any order order
Date: Mon, 24 Feb 2014 12:53:53 -0800	[thread overview]
Message-ID: <xmqq38j88c66.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20140224203946.GB25506@sigill.intra.peff.net> (Jeff King's message of "Mon, 24 Feb 2014 15:39:47 -0500")

Jeff King <peff@peff•net> writes:

> On Mon, Feb 24, 2014 at 12:32:32PM -0800, Junio C Hamano wrote:
>
>> >> +test_expect_success 'branch.*.pushremote config order is irrelevant' '
>> >> +	mk_test one_repo heads/master &&
>> >> +	mk_test two_repo heads/master &&
>> >> +	test_config remote.one.url one_repo &&
>> >> +	test_config remote.two.url two_repo &&
>> >> +	test_config branch.master.pushremote two_repo &&
>> >> +	test_config remote.pushdefault one_repo &&
>> >> +	git push &&
>> >> +	check_push_result one_repo $the_first_commit heads/master &&
>> >> +	check_push_result two_repo $the_commit heads/master
>> >> +'
>> >> +
>> 
>> This test however does not pass in the Git 2.0 world, without having
>> this line:
>> 
>>        test_config push.default matching &&
>> 
>> immediately before "git push".
>> 
>> Am I missing something?
>
> No, you are not missing anything. I was copying and paring down the
> pushremote test above, and I accidentally pared out the push.default
> setting. It should definitely have a
>
>   test_config push.default matching &&
>
> before the "git push" line, as the test above does. Can you mark it up
> as you apply?

Gladly ;-)

I wasn't thinking straight and thought push.default was somehow
affecting the logic to read the configuration files you fixed, which
was a complete nonsense.  The selection of which remote to push to
is affected by the branch.*.pushremote and remote.pushdefault, but
this "git push" still expects that the way the branches are chosen
to be pushed follow the matching semantics, not the simple
semantics, so we need that configuration there.

  reply	other threads:[~2014-02-24 20:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24  5:10 [BUG] remote.pushdefault and branch.<name>.pushremote definition order Jack Nagel
2014-02-24  8:59 ` [PATCH] remote: handle pushremote config in any order order Jeff King
2014-02-24 17:55   ` Junio C Hamano
2014-02-24 20:32     ` Junio C Hamano
2014-02-24 20:39       ` Jeff King
2014-02-24 20:53         ` Junio C Hamano [this message]
2014-02-24 22:45   ` Ramkumar Ramachandra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq38j88c66.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=artagnon@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jacknagel@gmail$(echo .)com \
    --cc=peff@peff$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox