From: Junio C Hamano Date: Thu, 06 Oct 2011 01:57:16 GMT Subject: Re: [RFC/PATCH] Add multiple workdir support to branch/checkout Message-ID: <7v1uuq51c3.fsf@alter.siamese.dyndns.org> In-Reply-To: Jay Soffian writes: > On Wed, Oct 5, 2011 at 9:15 PM, Junio C Hamano wrote: >> Jay Soffian writes: >> >>> So you're envisioning this? >>> >>>   $ git commit foo.c >>>   Warning, master is also checked out in workdir2 >> >> No. I would rather think it needs to be forced. > > Now they do what? Either commit --force or create a new branch? > Wouldn't it have been better to create the new branch before they > started editing? If they are going to commit, and if they knew that they are going to commit, yes. But why do you want to forbid people from just checking things out if they are not interested in committing? That is where I think you are going backwards. > I guess it depends what you mostly use your workdirs for. For me, it's > to have different branches checked out, not to have the same branch > checked out in multiple locations. Then you wouldn't have any problem if commit refused to make commit on the branch that is checked out elsewhere, no? I am not saying we should never have an option to _warn_ checking out the same branch in multiple places. I am saying it is wrong to forbid doing so by default.