Ivan Frade
0667b8ec4d
RepoCommand: Do not set 'branch' if the revision is a tag
The "branch" field in the .gitmodules is the signal for gerrit to keep the superproject autoupdated. Tags are immutable and there is no need to track them, plus the cgit client requires the field to be a "remote branch name" but not a tag. Do not set the "branch" field if the revision is a tag. Keep those tags in another field ("ref") as they help other tools to find the commit in the destination repository. We can still have false negatives when a refname is not fully qualified, but this check covers e.g. the most common case in android. Note that the javadoc of #setRecordRemoteBranch already mentions that "submodules that request a tag will not have branch name recorded". Change-Id: Ib1c321a4d3b7f8d51ca2ea204f72dc0cfed50c37 Signed-off-by: Ivan Frade <ifrade@google.com> |
3 years ago | |
---|---|---|
.. | ||
ManifestParserTest.java | Update EDL 1.0 license headers to new short SPDX compliant format | 4 years ago |
RepoCommandSymlinkTest.java | Update EDL 1.0 license headers to new short SPDX compliant format | 4 years ago |
RepoCommandTest.java | RepoCommand: Do not set 'branch' if the revision is a tag | 3 years ago |