]> arthur.barton.de Git - bup.git/commitdiff
Enable the reflog when initializing the repository.
authorZoran Zaric <zz@zoranzaric.de>
Thu, 27 Sep 2012 13:15:55 +0000 (15:15 +0200)
committerRob Browning <rlb@defaultvalue.org>
Thu, 27 Sep 2012 16:07:12 +0000 (11:07 -0500)
Avery noticed that this wasn't being done for bare repositories, so
ask for it explicitly.

Reported-by: Avery Pennarun <apenwarr@gmail.com>
Signed-off-by: Zoran Zaric <zz@zoranzaric.de>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/git.py

index 5cb282922c392169dffc6bb9083ae441be606256..8afe0b8e17ba5d7b21a494f2854dbbcd8431e594 100644 (file)
@@ -830,6 +830,10 @@ def init_repo(path=None):
     p = subprocess.Popen(['git', 'config', 'pack.indexVersion', '2'],
                          stdout=sys.stderr, preexec_fn = _gitenv)
     _git_wait('git config', p)
+    # Enable the reflog
+    p = subprocess.Popen(['git', 'config', 'core.logAllRefUpdates', 'true'],
+                         stdout=sys.stderr, preexec_fn = _gitenv)
+    _git_wait('git config', p)
 
 
 def check_repo_or_die(path=None):