changeset 6447:b57baf83dc3d

git: clarify that non-bare git repos not are supported (Issue #254) Non-bare repos must have a branch checked out ... and then you can't push to the branch.
author Mads Kiilerich <madski@unity3d.com>
date Sun, 22 Jan 2017 01:16:52 +0100
parents 347f38529080
children 7250e5b1ab46
files kallithea/lib/utils.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/utils.py	Sun Jan 22 01:16:52 2017 +0100
+++ b/kallithea/lib/utils.py	Sun Jan 22 01:16:52 2017 +0100
@@ -228,8 +228,11 @@
                 continue
 
             cur_path = os.path.join(root, subdir)
+            if isdir(cur_path, '.git'):
+                log.warning('ignoring non-bare Git repo: %s', cur_path)
+                continue
+
             if (isdir(cur_path, '.hg') or
-                isdir(cur_path, '.git') or
                 isdir(cur_path, '.svn') or
                 isdir(cur_path, 'objects') and (isdir(cur_path, 'refs') or
                                                 os.path.isfile(os.path.join(cur_path, 'packed-refs')))):