Re: [PATCH 2/2] git-init: set receive.guardCurrentBranch = true for non-bare repositories

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

 



Hi,

On Sun, 23 Mar 2008, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:
> 
> > When initializing a non-bare repositories, you most likely want to 
> > avoid pushing into the current branch (because a push does not touch 
> > the working tree at all).
> 
> As I described in my other message, I suspect that treating the current 
> branch specially like this is a wrong approach.  The configuration might 
> be a good idea, but shouldn't it prevent any local branch from getting 
> updated?  Push into non-bare repository is simply a fetch run in reverse 
> direction.

That would break this work flow:

	# machine A
	$ git push B master:refs/heads/tmp

	# machine B
	$ git merge tmp
	$ git branch -d tmp

Besides, there is a _vital_ difference between the current branch, and any 
other local branch: pushing into other local branches cannot make your 
working tree stale.

Ciao,
Dscho

--
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