]> git.scottworley.com Git - git-cache/commitdiff
Fix bug: Stray output on new cache entry
authorScott Worley <scottworley@scottworley.com>
Wed, 26 Aug 2020 05:45:29 +0000 (22:45 -0700)
committerScott Worley <scottworley@scottworley.com>
Wed, 26 Aug 2020 05:45:29 +0000 (22:45 -0700)
Changelog
git_cache.py

index 52b5a6f881727c4fd6aa01e3ae56635ad7db845b..eff794eb37a1e4569e0357f5cd7d863d09ce0079 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,6 @@
 ## [Unreleased]
 ## [Unreleased]
+### Changed
+- Fixed stray output from repo creation
 
 
 ## [1.2.2] - 2020-08-25
 
 
 ## [1.2.2] - 2020-08-25
index c848161076caa44f8bccfa7c28180c2da8ac13d8..aab5b070fdb15509f4fd74cd182db5ecfc541280 100644 (file)
@@ -53,7 +53,8 @@ def fetch(repo: Repo, ref: Ref) -> Tuple[Path, Rev]:
     cachedir = git_cachedir(repo)
     if not os.path.exists(cachedir):
         logging.debug("Initializing git repo")
     cachedir = git_cachedir(repo)
     if not os.path.exists(cachedir):
         logging.debug("Initializing git repo")
-        subprocess.run(['git', 'init', '--bare', cachedir], check=True)
+        subprocess.run(['git', 'init', '--bare', cachedir],
+                       check=True, stdout=sys.stderr)
 
     logging.debug('Fetching ref "%s" from %s', ref, repo)
     _git_fetch(cachedir, repo, ref)
 
     logging.debug('Fetching ref "%s" from %s', ref, repo)
     _git_fetch(cachedir, repo, ref)