]> git.notmuchmail.org Git - notmuch/commitdiff
nmbug: mark repository as bare on clone
authorDavid Bremner <david@tethera.net>
Sat, 12 Apr 2014 16:30:32 +0000 (13:30 -0300)
committerDavid Bremner <david@tethera.net>
Tue, 15 Apr 2014 20:20:19 +0000 (17:20 -0300)
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

index d6f5213a08cf391ef3f43b3274dc87fce9eb905d..b18ded7b7c1e48cf7b54a1e6901cb92c7cbf1961 100755 (executable)
@@ -134,6 +134,7 @@ sub do_clone {
           $repository, $tempwork) == 0
     or die "'git clone' exited with nonzero value\n";
   git ('config', '--unset', 'core.worktree');
           $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 {
 }
 
 sub is_committed {