diff options
author | Aymen Bouaziz <aymen.bouaziz@parrot.com> | 2016-06-28 12:27:23 +0200 |
---|---|---|
committer | Aymen Bouaziz <aymen.bouaziz@parrot.com> | 2016-06-28 12:31:25 +0200 |
commit | 037040f73e0940957dff77e74b40d5c85734e712 (patch) | |
tree | 07fcdde5ecda3988a915f88ea5e55a71b0c48dda /project.py | |
parent | 203153e7bba61b1b2d782e9e75aef919eab0d54b (diff) | |
download | git-repo-037040f73e0940957dff77e74b40d5c85734e712.tar.gz |
Fix variable assignment
If upstream string is empty, current_branch_only variable will be assigned
to an empty string.
This is not what we expect here as this variable is a boolean.
Change-Id: Ibba935e25a74c2be1e50c88b4b403cf394ba365e
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1838,7 +1838,10 @@ class Project(object): | |||
1838 | # will fail. | 1838 | # will fail. |
1839 | # * otherwise, fetch all branches to make sure we end up with the | 1839 | # * otherwise, fetch all branches to make sure we end up with the |
1840 | # specific commit. | 1840 | # specific commit. |
1841 | current_branch_only = self.upstream and not ID_RE.match(self.upstream) | 1841 | if self.upstream: |
1842 | current_branch_only = not ID_RE.match(self.upstream) | ||
1843 | else: | ||
1844 | current_branch_only = False | ||
1842 | 1845 | ||
1843 | if not name: | 1846 | if not name: |
1844 | name = self.remote.name | 1847 | name = self.remote.name |