From: David Bremner <david@tethera.net>
Date: Sat, 12 Apr 2014 16:30:32 +0000 (-0300)
Subject: nmbug: mark repository as bare on clone
X-Git-Tag: 0.18_rc0~25
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=dd24fdd33a3c06b2c2ad6bcb8e7d18bc8442f51f;p=notmuch-old

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
---

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 {