Subject: Pushing into a repository with working directory?

From: "Shawn O. Pearce" <[email-masked]>
Date: Mon, 1 Jan 2007 23:51:08 -0500

So tonight on #git I think I answered for the 10th time why the
working directory doesn't update after a push to its associated
repository.

We all know its somewhat dangerous to push into the current branch
of a working directory, especially if that working directory contains
uncommitted changes, as HEAD no longer matches the index.

But we all also know its incredibly useful to be able to push into
a repository with a working directory, so we certainly don't want
to disallow it entirely.

What about refusing a push to the current branch (branch listed in
$GIT_DIR/HEAD) and the repository appears to have a working directory
(is_bare_git_dir is false)?

-- 
Shawn.