Re: [PATCH 1/2] Add a few more values for receive.denyCurrentBranch
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 10, 2014, 13:03 UTC
- Message-ID
- <alpine.DEB.1.00.1411101401510.13845@s15462909.onlinehome-server.info>
- In-Reply-To
- <20141108111855.GA21620@peff.net>
Hi Peff,
On Sat, 8 Nov 2014, Jeff King wrote:
Show 22 quoted lines
> On Fri, Nov 07, 2014 at 02:58:17PM +0100, Johannes Schindelin wrote: > > > Under certain circumstances, it makes a *lot* of sense to allow pushing > > into the current branch. For example, when two machines with different > > Operating Systems are required for testing, it makes much more sense to > > synchronize between working directories than having to go via a third > > server. > > FWIW, I do this without a third server (and without resorting to pull), > with: > > host1$ git push host2 master:refs/remotes/host1/master > host2$ git merge host1/master > > You can even set up a push refspec to make "git push host2" do the right > thing. > > That being said, I do like the premise of your patch, as it eliminates > the extra step on the remote side (which is not that big a deal in > itself, but when you realize that host2 _did_ have some changes on it, > then you end up doing the merge there, when in general I'd prefer to do > all the work on host1 via "git pull").
Plus: you have the luxury of working on an OS that makes ssh'ing from another machine relatively easy. At least if you have the root password on your machine. Which, I hate to point it out, is not too common a commodity.
Ciao, Dscho