diff options
| author | Jimmie Wester <jimmie.wester@stericsson.com> | 2012-12-07 12:49:51 +0100 |
|---|---|---|
| committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-05-08 06:54:10 +0100 |
| commit | 2f992cba3238ff9a849c02fbf9a423e234deab16 (patch) | |
| tree | 57abf164400926fc4410058366db0fb7a97d88c4 | |
| parent | 45401230cf2b071562617da02ab751468e9aaf8d (diff) | |
| download | git-repo-2f992cba3238ff9a849c02fbf9a423e234deab16.tar.gz | |
Repo should not fetch tags for shallow projects
Fetching all tags for a shallow git results in an
inconstent git and forces git to fetch more than
the depth specified.
This change teaches repo not to fetch any tags in a
repository initialised with the depth option.
Change-Id: I557ead9f88fa0d6a19b1cb55b23bba1100fcb8f2
Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
| -rw-r--r-- | project.py | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -1661,7 +1661,9 @@ class Project(object): | |||
| 1661 | 1661 | ||
| 1662 | if not current_branch_only: | 1662 | if not current_branch_only: |
| 1663 | # Fetch whole repo | 1663 | # Fetch whole repo |
| 1664 | if no_tags: | 1664 | # If using depth then we should not get all the tags since they may |
| 1665 | # be outside of the depth. | ||
| 1666 | if no_tags or depth: | ||
| 1665 | cmd.append('--no-tags') | 1667 | cmd.append('--no-tags') |
| 1666 | else: | 1668 | else: |
| 1667 | cmd.append('--tags') | 1669 | cmd.append('--tags') |
