Re: git bug/feature request
- From
Daniel Barkalow <barkalow@iabervon.org>
- Date
- Nov 27, 2007, 20:19 UTC
- Message-ID
- <Pine.LNX.4.64.0711271514180.5349@iabervon.org>
- In-Reply-To
- <FA6B0BE9-FC43-4298-932F-627826ADE18F@midwinter.com>
On Tue, 27 Nov 2007, Steven Grimm wrote:
Show 10 quoted lines
> On Nov 27, 2007, at 7:13 AM, Jakub Narebski wrote: > >I thought that modern git refuses to push into checked out branch > >(in HEAD) in non-bare repositories. > > It doesn't -- otherwise the "update the working copy when a push to the > current branch comes in" update hook scripts that some of us use wouldn't > work, and they do work at the moment. (Before anyone warns me of the dangers > of that: the hook only runs in a shared repo that no human is allowed to > modify, so the working copy is always a clean version of HEAD and thus is safe > to update.)
It could require the working copy to be a clean version of HEAD, and, in this case, update it. Then it would always be kept consistent one way or the other, without consistency depending on the use of a hook. (This is like how a pre-refs/remotes/ pull into a checked-out origin was handled, and it seemed reliable there)
-Daniel *This .sig left intentionally blank*