nmbug: mark repository as bare on clone

If a git repository is non-bare, and core.worktree is not set, git
tries to deduce the worktree. This deduction is not always helpful, e.g.

% git --git-dir=$HOME/.nmbug clean -f

would likely delete most of the files in the current directory
This commit is contained in:
David Bremner 2014-04-12 13:30:32 -03:00
parent a63ca54b1f
commit dd24fdd33a

View file

@ -134,6 +134,7 @@ sub do_clone {
$repository, $tempwork) == 0 $repository, $tempwork) == 0
or die "'git clone' exited with nonzero value\n"; or die "'git clone' exited with nonzero value\n";
git ('config', '--unset', 'core.worktree'); git ('config', '--unset', 'core.worktree');
git ('config', 'core.bare', 'true');
} }
sub is_committed { sub is_committed {