[projects/git-slug: 92/170] Create bare repository when gitdir is not a subidr of workdir
glen
glen at pld-linux.org
Mon Sep 21 21:46:32 CEST 2015
commit f7137a188773a6f63bb2df8b51a0ba93847b514c
Author: Kacper Kornet <draenog at pld-linux.org>
Date: Wed Mar 14 17:49:42 2012 +0000
Create bare repository when gitdir is not a subidr of workdir
git_slug/gitrepo.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/git_slug/gitrepo.py b/git_slug/gitrepo.py
index 513625d..9bc3c65 100644
--- a/git_slug/gitrepo.py
+++ b/git_slug/gitrepo.py
@@ -59,7 +59,7 @@ class GitRepo:
def init(self, remotepull, remotepush = None, remotename=REMOTE_NAME):
clist = ['git', 'init']
- if self.wtree is not None:
+ if os.path.dirname(self.gdir) == self.wtree:
clist.append(self.wtree)
else:
clist.extend(['--bare', self.gdir])
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/git-slug.git/commitdiff/4ed64f73960519a2f4fd04c42950b2c96ae795c5
More information about the pld-cvs-commit
mailing list