From dd24fdd33a3c06b2c2ad6bcb8e7d18bc8442f51f Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sat, 12 Apr 2014 13:30:32 -0300 Subject: [PATCH] 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 --- devel/nmbug/nmbug | 1 + 1 file changed, 1 insertion(+) diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug index d6f5213a..b18ded7b 100755 --- a/devel/nmbug/nmbug +++ b/devel/nmbug/nmbug @@ -134,6 +134,7 @@ sub do_clone { $repository, $tempwork) == 0 or die "'git clone' exited with nonzero value\n"; git ('config', '--unset', 'core.worktree'); + git ('config', 'core.bare', 'true'); } sub is_committed { -- 2.26.2