mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
git_config: add support for remote '.'
As a fix for issue #149, this patch add support for the remote '.' (local). As an alias for the local repository, remote '.' is lacking a fetch = config in .git/config. Without such refspec, repo info --overview is not able to process a local tracking branch. v2: Check for name == '.' before checking if merge starts with refs/, since the case where it's not is invalid. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Signed-off-by: Filipe Brandenburger <filbranden@google.com> Change-Id: I8c8fd8602cd68baecb530301ae41d37d751ec85d
This commit is contained in:
parent
85e8267031
commit
936183a492
@ -619,7 +619,7 @@ class Remote(object):
|
|||||||
def ToLocal(self, rev):
|
def ToLocal(self, rev):
|
||||||
"""Convert a remote revision string to something we have locally.
|
"""Convert a remote revision string to something we have locally.
|
||||||
"""
|
"""
|
||||||
if IsId(rev):
|
if self.name == '.' or IsId(rev):
|
||||||
return rev
|
return rev
|
||||||
|
|
||||||
if not rev.startswith('refs/'):
|
if not rev.startswith('refs/'):
|
||||||
|
Loading…
Reference in New Issue
Block a user