Re: [PATCH v5] Add another option for receive.denyCurrentBranch

2014-12-02 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >>> This is because you know receive-pack runs inside the $GIT_DIR, >>> whether it is a bare or non-bare repository, so either core.worktree >>> points at a directory that is otherwise unrelated to the $GIT_DIR >>> (but is the correct $GIT_W

Re: [PATCH v5] Add another option for receive.denyCurrentBranch

2014-12-02 Thread Johannes Schindelin
Hi Junio, On Tue, 2 Dec 2014, Junio C Hamano wrote: > This feature [...] needs to be documented with an entry in the BUGS > section, saying that it will not work in a repository that is tied to > its working tree via the "gitdir:" mechanism. Fair enough. But which BUGS section? Should I add one

Re: [PATCH v5] Add another option for receive.denyCurrentBranch

2014-12-02 Thread Junio C Hamano
Johannes Schindelin writes: >> This is because you know receive-pack runs inside the $GIT_DIR, >> whether it is a bare or non-bare repository, so either core.worktree >> points at a directory that is otherwise unrelated to the $GIT_DIR >> (but is the correct $GIT_WORK_TREE), or the top of the wor

Re: [PATCH v5] Add another option for receive.denyCurrentBranch

2014-12-02 Thread Johannes Schindelin
Hi Junio, On Mon, 1 Dec 2014, Junio C Hamano wrote: > Junio C Hamano writes: > > > Johannes Schindelin writes: > > > >> +static const char *update_worktree(unsigned char *sha1) > >> +{ > >> +... > >> + const char *work_tree = git_work_tree_cfg ? git_work_tree_cfg : ".."; > > > > I overlooked

Re: [PATCH v5] Add another option for receive.denyCurrentBranch

2014-12-01 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >> +static const char *update_worktree(unsigned char *sha1) >> +{ >> +... >> +const char *work_tree = git_work_tree_cfg ? git_work_tree_cfg : ".."; > > I overlooked this one, but is there a reason why this has to look at > an internal im

Re: [PATCH v5] Add another option for receive.denyCurrentBranch

2014-12-01 Thread Junio C Hamano
Johannes Schindelin writes: > +static const char *update_worktree(unsigned char *sha1) > +{ > +... > + const char *work_tree = git_work_tree_cfg ? git_work_tree_cfg : ".."; I overlooked this one, but is there a reason why this has to look at an internal implementatino detail which is git_wor

Re: [PATCH v5] Add another option for receive.denyCurrentBranch

2014-11-30 Thread Johannes Schindelin
Hi Junio, On Sun, 30 Nov 2014, Junio C Hamano wrote: > Thanks, will queue. Thanks! > I think we would need a bit more tests to protect the feature from > future changes, if you care about the cleanliness requirement of > this feature which is a lot stricter than that of "git checkout". > > Per

Re: [PATCH v5] Add another option for receive.denyCurrentBranch

2014-11-30 Thread Junio C Hamano
Thanks, will queue. I think we would need a bit more tests to protect the feature from future changes, if you care about the cleanliness requirement of this feature which is a lot stricter than that of "git checkout". Perhaps like this one on top. -- >8 -- From: Junio C Hamano Date: Sun, 30 Nov

[PATCH v5] Add another option for receive.denyCurrentBranch

2014-11-26 Thread Johannes Schindelin
When synchronizing between working directories, it can be handy to update the current branch via 'push' rather than 'pull', e.g. when pushing a fix from inside a VM, or when pushing a fix made on a user's machine (where the developer is not at liberty to install an ssh daemon let alone know the use