From: Bernhard R. Link Date: Thu, 06 Oct 2011 11:25:30 GMT Subject: Re: [RFC/PATCH] Add multiple workdir support to branch/checkout Message-ID: <20111006112530.GB27897@server.brlink.eu> In-Reply-To: <7vzkhf713u.fsf@alter.siamese.dyndns.org> * Junio C Hamano [111005 20:19]: > I do not necessarily think that it is a good approach to forbid the same > branch to be checked out in two different places, by the way. [...] > [...] The problem arises only when one of the repositories try > to update or delete the branch while it is checked out in another working > tree. I think this is mostly the same problem that also make pushing to a checked out branch a problem. Isn't the real problem that a checked out branch / a branch having a workdir only has information what branch it belongs to? Wouldn't both problems (multiple workdirs of the same branch, pushing to a checked out branch) solved if each working directory (including the default one in a non-bare repository) also stored the commit id last checked out? (And then giving a warning, error or automatically creating a detached head setting whenever the branch it followed is moved behind it's back?) Bernhard R. Link