From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff King Subject: Re: [ITCH] Specify refspec without remote Date: Wed, 10 Apr 2013 16:24:56 -0400 Message-ID: <20130410202456.GF24177@sigill.intra.peff.net> References: <7vobdnnpx6.fsf@alter.siamese.dyndns.org> <20130410041343.GB795@sigill.intra.peff.net> <7v4nfenxzm.fsf@alter.siamese.dyndns.org> <20130410172748.GA16908@sigill.intra.peff.net> <7vhajemd1x.fsf@alter.siamese.dyndns.org> <20130410185958.GA22394@sigill.intra.peff.net> <20130410200548.GC24177@sigill.intra.peff.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: Junio C Hamano , Jonathan Nieder , Git List , Duy =?utf-8?B?Tmd1eeG7hW4=?= To: Ramkumar Ramachandra X-From: git-owner@vger.kernel.org Wed Apr 10 22:25:11 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UQ1Zu-0000M9-C7 for gcvg-git-2@plane.gmane.org; Wed, 10 Apr 2013 22:25:10 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936514Ab3DJUZE (ORCPT ); Wed, 10 Apr 2013 16:25:04 -0400 Received: from 75-15-5-89.uvs.iplsin.sbcglobal.net ([75.15.5.89]:39143 "EHLO peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932803Ab3DJUZD (ORCPT ); Wed, 10 Apr 2013 16:25:03 -0400 Received: (qmail 6675 invoked by uid 107); 10 Apr 2013 20:26:55 -0000 Received: from sigill.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.7) (smtp-auth username relayok, mechanism cram-md5) by peff.net (qpsmtpd/0.84) with ESMTPA; Wed, 10 Apr 2013 16:26:55 -0400 Received: by sigill.intra.peff.net (sSMTP sendmail emulation); Wed, 10 Apr 2013 16:24:56 -0400 Content-Disposition: inline In-Reply-To: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Thu, Apr 11, 2013 at 01:49:54AM +0530, Ramkumar Ramachandra wrote: > > Right, the example above might include multiple remotes if pushremote is > > respected. Or it might not come up with an answer at all for a tag. > > If you do: > > > > git push -- v1.2.3 master > > > > where does v1.2.3 go? To remote.pushdefault? That seems simple and > > consistent, as there is no ref-specific pushremote defined. > > remote.pushdefault indeed. > > > But I'd > > guess that the user probably _wanted_ it to go to > > branch.master.pushremote. > > Huh, why? Simply because he specified master alongside it? How can > we infer what you said in a consistent system? That's kind of my point. Why would they put two refs together in a single push command? Did they mean "I am pushing up master, and since I just tagged it, send the tag along, too"? Or did they really mean to push them to two different places? If so, why not just run two separate push commands? I am not saying git should guess that the user wanted the tag to along with master. I am saying that the set of rules to come to that conclusion is going to be too baroque for the user to understand, and too often wrong in other cases, and that we should not go there. -Peff