diff options
author | Aravind Vasudevan <aravindvasudev@google.com> | 2023-04-04 23:44:37 +0000 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-04-05 19:05:45 +0000 |
commit | 99ebf627dbf50ea18935a3ab59e3c51fb41b7f77 (patch) | |
tree | 2674fd1ec10d952175c4197e94285424f76b5a38 /project.py | |
parent | 57cb42861d37eec074a729f33d1c5aa90be86b3f (diff) | |
download | git-repo-99ebf627dbf50ea18935a3ab59e3c51fb41b7f77.tar.gz |
upload: Add `--no-follow-tags` by default to git push
Gerrit does not accept pushing git tags to CLs. Hence, this change disables push.followTags for repo upload.
Fixed: b/155095555
Change-Id: I8d99eac29c0b4b375bdb857ed063914441026fa1
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/367736
Tested-by: Aravind Vasudevan <aravindvasudev@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1107,6 +1107,12 @@ class Project(object): | |||
1107 | if url.startswith("ssh://"): | 1107 | if url.startswith("ssh://"): |
1108 | cmd.append("--receive-pack=gerrit receive-pack") | 1108 | cmd.append("--receive-pack=gerrit receive-pack") |
1109 | 1109 | ||
1110 | # This stops git from pushing all reachable annotated tags when | ||
1111 | # push.followTags is configured. Gerrit does not accept any tags | ||
1112 | # pushed to a CL. | ||
1113 | if git_require((1, 8, 3)): | ||
1114 | cmd.append("--no-follow-tags") | ||
1115 | |||
1110 | for push_option in push_options or []: | 1116 | for push_option in push_options or []: |
1111 | cmd.append("-o") | 1117 | cmd.append("-o") |
1112 | cmd.append(push_option) | 1118 | cmd.append(push_option) |