[projects/git-slug: 109/170] Option in refrepo for GitArchiveRefsData to work

glen glen at pld-linux.org
Mon Sep 21 21:47:58 CEST 2015


commit a35d165fe43532cfa1c7bf86e6e3f84230fb016c
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Tue Mar 27 03:17:23 2012 +0100

    Option in refrepo for GitArchiveRefsData to work
    
    To enable git archive --remote daemon.upload-archive must be set
    to true.

 slug_watch | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/slug_watch b/slug_watch
index 90699b7..4646f0c 100755
--- a/slug_watch
+++ b/slug_watch
@@ -39,7 +39,6 @@ def lock(path=LOCKFILE):
             f.close()
             os.remove(path)
 
-
 def convertstream(stream):
     for line in stream:
         (sha1, ref, repo) = line.decode('utf-8').split()
@@ -91,8 +90,12 @@ def runwatch(user=None):
         if not os.path.isdir(directory):
             print('Creating {}'.format(directory))
             os.mkdir(directory)
+
+    refrepo = GitRepo(git_dir=REFREPO_GDIR)
     if not os.path.isdir(REFREPO_GDIR):
-        GitRepo(git_dir=REFREPO_GDIR).init_gitdir()
+        refrepo.init_gitdir()
+    refrepo.commandexc(['config', 'daemon.uploadarch', 'true'])
+
 
     with lock(LOCKFILE):
         wm = pyinotify.WatchManager()  # Watch Manager
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5



More information about the pld-cvs-commit mailing list