]> git.ipfire.org Git - thirdparty/git.git/commit - git-commit.sh
Disallow working directory commands in a bare repository.
authorShawn O. Pearce <spearce@spearce.org>
Sun, 31 Dec 2006 04:32:38 +0000 (23:32 -0500)
committerJunio C Hamano <junkio@cox.net>
Wed, 10 Jan 2007 23:03:09 +0000 (15:03 -0800)
commit7eff28a9b42cb0d3aad932338b2e645fc6ed8fa9
treec22c8cf02e3b09568198fa405ba7322aafe328ae
parent4b441f47cefe7f4861167a151a395606e1a16745
Disallow working directory commands in a bare repository.

If the user tries to run a porcelainish command which requires
a working directory in a bare repository they may get unexpected
results which are difficult to predict and may differ from command
to command.

Instead we should detect that the current repository is a bare
repository and refuse to run the command there, as there is no
working directory associated with it.

[jc: updated Shawn's original somewhat -- bugs are mine.]

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-am.sh
git-checkout.sh
git-clean.sh
git-commit.sh
git-merge.sh
git-pull.sh
git-rebase.sh
git-reset.sh
git-revert.sh
git-sh-setup.sh
git.c