summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-08-23 12:53:08 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2012-08-23 12:53:08 +0100
commitee7ae31a71478228b5d5c3e0ece32fd874b35645 (patch)
tree03eb6a715c79e971886b6d94c64f0038d1149576 /scripts
parentdabca9a5bf30c3eb9564e7130938c88bc7e4ab6b (diff)
downloadmorph-ee7ae31a71478228b5d5c3e0ece32fd874b35645.tar.gz
scripts/clean-git-cache: Fix 2 small issues
1) print message if no unused gits were found 2) avoid eating baserock:morphs repository every time
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/clean-git-cache6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/clean-git-cache b/scripts/clean-git-cache
index 61e43e4e..bcc106aa 100755
--- a/scripts/clean-git-cache
+++ b/scripts/clean-git-cache
@@ -155,7 +155,9 @@ class CleanGitCache(cliapp.Application):
morphs_branch,
git_cache_dir)
- if self.settings['remove']:
+ if unused_gits == []:
+ print "No unused git repos found."
+ elif self.settings['remove']:
print "Removing unused git repositories ..."
for git in unused_gits:
@@ -181,7 +183,7 @@ class CleanGitCache(cliapp.Application):
refs = [x.split() for x in refs if 'origin' in x]
morphs_ref = refs[0][0]
- gits_in_use_list = [morphs_repo]
+ gits_in_use_list = [quote_url(morphs_repo)]
for filename in self._ls_tree(morphs_dir, morphs_ref):
if not filename.endswith('.morph'):