diff options
author | Ivan Frade <ifrade@google.com> | 2021-05-24 17:31:25 -0700 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2021-05-26 14:32:04 +0200 |
commit | 0667b8ec4d8b10ebc57271642953de6852c3331b (patch) | |
tree | d21824f7c48a3c7501a9f6b47db69ced8373fab3 /org.eclipse.jgit.ssh.apache.test | |
parent | a43ad1e56d5654f78743e461efe72060d447f586 (diff) | |
download | jgit-0667b8ec4d8b10ebc57271642953de6852c3331b.tar.gz jgit-0667b8ec4d8b10ebc57271642953de6852c3331b.zip |
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>
Diffstat (limited to 'org.eclipse.jgit.ssh.apache.test')
0 files changed, 0 insertions, 0 deletions