Re: [PATCH 2/3] push: add --current
From: Paolo Bonzini <hidden>
Date: 2016-06-15 22:47:04
quoted
+--current:: + Independent of the other options, restrict pushing to the current + HEAD.To me, this sounds like there are multiple HEADs and this selects the current one to be pushed, which would be wrong. Maybe this could be written as: Restrict pushing to the currently checked out branch head.
I wrote that referring to "the branch currently pointed to by [the symref] HEAD".
Hm, this only talks about refspecs in the config, but your patch series is especially about push.default=tracking, which is not a refspec set in the config, but causes a refspec to be generated on the fly.
Not really, as push.default=tracking and push.default=current would anyway push only the currently checked out branch. "git push --current" would have a visible effect only for push.default=matching (the effect would be the same as push.default=current except that a new branch will not be created remotely). If you have creted all your tracking branches with autosetuppush, then in that case "git push --current" or pushHeadOnly will indeed achieve the same effect as push.default=tracking; however, that would be with real refspecs in the config rather than with one generated on the fly. And since in that case you have a push refspec in the configuration, push.default would not be used. Paolo