Re: [PATCH 2/2] push: Add '--current', which pushes only the current branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:

> Steffen Prohaska <prohaska@xxxxxx> 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.<remotename>.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 <remotename> HEAD".

   Question: what to do if there is no remote.<remotename>.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.<remotename>.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


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux