]> rtime.felk.cvut.cz Git - notmuch.git/commitdiff
My nmbug init change
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 30 Nov 2014 10:52:03 +0000 (11:52 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sun, 30 Nov 2014 10:52:03 +0000 (11:52 +0100)
devel/nmbug/nmbug

index 23bac5c048419e06d2b17d7113e21159165fb6ee..0bb32ce1e33310bfcf357a95c27cf390da650209 100755 (executable)
@@ -380,20 +380,17 @@ def init(remote=None):
     This wraps 'git init' with a few extra steps to support subsequent
     status and commit commands.
     """
-    with _tempfile.TemporaryDirectory(prefix='nmbug-init.') as workdir:
-        _spawn(
-            args=['git', 'init', '--separate-git-dir', NMBGIT, workdir],
-            wait=True)
-        _git(args=['config', '--unset', 'core.worktree'], wait=True)
-        _git(args=['config', 'core.bare', 'true'], wait=True)
-        # create an empty blob (e69de29bb2d1d6434b8b29ae775ad8c2e48c5391)
-        _git(args=['hash-object', '-w', '--stdin'], input='', wait=True)
-        _git(
-            args=[
-                'commit', '--allow-empty', '-m', 'Start a new nmbug repository'
-                ],
-            additional_env={'GIT_WORK_TREE': workdir},
-            wait=True)
+    _spawn(
+        args=['git', '--git-dir', NMBGIT, 'init', '--bare'],
+        wait=True)
+    # create an empty blob (e69de29bb2d1d6434b8b29ae775ad8c2e48c5391)
+    _git(args=['hash-object', '-w', '--stdin'], input='', wait=True)
+    _git(
+        args=[
+            'commit', '--allow-empty', '-m', 'Start a new nmbug repository'
+            ],
+        additional_env={'GIT_WORK_TREE': NMBGIT},
+        wait=True)
 
 
 def checkout():