Index: scm.py |
diff --git a/scm.py b/scm.py |
index c47a00c2466847ee0a4483db83aca31ec5a5e5e5..1d15243d4691fb024e1ad12ed9094375e98cbe3d 100644 |
--- a/scm.py |
+++ b/scm.py |
@@ -205,20 +205,16 @@ class GIT(object): |
branch = GIT.GetBranch(cwd) |
upstream_branch = None |
upstream_branch = GIT.Capture( |
- ['config', 'branch.%s.merge' % branch], error_ok=True).strip() |
+ ['config', 'branch.%s.merge' % branch], in_directory=cwd, |
+ error_ok=True).strip() |
if upstream_branch: |
remote = GIT.Capture( |
['config', 'branch.%s.remote' % branch], |
- error_ok=True).strip() |
+ in_directory=cwd, error_ok=True).strip() |
else: |
# Fall back on trying a git-svn upstream branch. |
if GIT.IsGitSvn(cwd): |
upstream_branch = GIT.GetSVNBranch(cwd) |
- # Fall back on origin/master if it exits. |
- if not upstream_branch: |
- GIT.Capture(['branch', '-r']).split().count('origin/master') |
- remote = 'origin' |
- upstream_branch = 'refs/heads/master' |
return remote, upstream_branch |
@staticmethod |