From: Jakub Narebski Date: Mon, 19 Nov 2007 11:17:17 GMT Subject: Re: [PATCH 2/2] push: Add '--current', which pushes only the current branch Message-ID: In-Reply-To: <7vk5oeocnr.fsf@gitster.siamese.dyndns.org> Junio C Hamano wrote: > Steffen Prohaska writes: > >> What's left is a new switch "--current". Less code, easy >> to explain. > > But won't that force the "current" people always type that from > the command line, as your previous point was that your earlier > patch to say "remote.$there.push = HEAD" does not work that way? > If that configuration works as expected, then I'd 100% agree > that we would not need push.defaultRefs. Either you do not have > "push" at all if your preference is --matching, or you do have > "push = HEAD" if your preference is --current. But if it > doesn't (which was what I gathered from your earlier response), > having a configuration would help them, wouldn't it? Brief recap, to check if I understand things correctly: 1. If you use "matching" more often, then it should be enough to provide remote..push with refspec or wildcard refspec. "git push" would push matching. If one wants to push only current branch, one would use "git push --current" or "git push HEAD". Question: what to do if there is no remote..push? Assume 1-1 matching? 2. If you use "current" more often, then it should be anough (after correcting git; although it was written that it is quite a bit of work) to provide "remote..push = HEAD", or "push.defaultRefs = current" if one wants to set this up for all remotes, or perhaps "remote.*.push = HEAD". "git push" would push current. If one wants to push matching, one would use "git push --matching"... although for matching one needs remote configured... -- Jakub Narebski Warsaw, Poland ShadeHawk on #git