diff options
author | Mitchel Humpherys <mitchelh@codeaurora.org> | 2014-03-10 14:21:59 -0700 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2014-03-12 16:34:53 +0900 |
commit | 26c45a79586da17fe2e26a427acb56c81fb3bcc5 (patch) | |
tree | 8829c11deca6e259c39cab47251b3978ad6ea310 | |
parent | 68425f4da878b5c7c77cc490539eeb83eb46256e (diff) | |
download | git-repo-26c45a79586da17fe2e26a427acb56c81fb3bcc5.tar.gz |
Make --no-tags work with -c
Currently, the --no-tags option is ignored if the user asks to only
fetch the current branch. There is no reason for this restriction. Fix
it.
Change-Id: Ibaaeae85ebe9955ed49325940461d630d794b990
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
-rw-r--r-- | project.py | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1763,15 +1763,15 @@ class Project(object): | |||
1763 | cmd.append('--update-head-ok') | 1763 | cmd.append('--update-head-ok') |
1764 | cmd.append(name) | 1764 | cmd.append(name) |
1765 | 1765 | ||
1766 | # If using depth then we should not get all the tags since they may | ||
1767 | # be outside of the depth. | ||
1768 | if no_tags or depth: | ||
1769 | cmd.append('--no-tags') | ||
1770 | else: | ||
1771 | cmd.append('--tags') | ||
1772 | |||
1766 | if not current_branch_only: | 1773 | if not current_branch_only: |
1767 | # Fetch whole repo | 1774 | # Fetch whole repo |
1768 | # If using depth then we should not get all the tags since they may | ||
1769 | # be outside of the depth. | ||
1770 | if no_tags or depth: | ||
1771 | cmd.append('--no-tags') | ||
1772 | else: | ||
1773 | cmd.append('--tags') | ||
1774 | |||
1775 | cmd.append(str((u'+refs/heads/*:') + remote.ToLocal('refs/heads/*'))) | 1775 | cmd.append(str((u'+refs/heads/*:') + remote.ToLocal('refs/heads/*'))) |
1776 | elif tag_name is not None: | 1776 | elif tag_name is not None: |
1777 | cmd.append('tag') | 1777 | cmd.append('tag') |