]> source.dussan.org Git - jgit.git/commit
RepoProject: read the "upstream" attribute of a project 28/1195528/2
authorIvan Frade <ifrade@google.com>
Thu, 30 May 2024 17:56:20 +0000 (10:56 -0700)
committerIvan Frade <ifrade@google.com>
Thu, 30 May 2024 21:17:53 +0000 (14:17 -0700)
commit1dd6324d4b4d9596813b18a44e315295f559ea12
tree58cab9416465d0d7932d67b48a8f1021d4acbc8d
parent9b2fe85c0279f4d5ac69f07ddcd48566c3555405
RepoProject: read the "upstream" attribute of a project

The manifest spec [1] defines the "upstream" attribute: "name of the
git ref in which a sha1 can be found", when the revision is a
sha1. The parser is ignoring it, but RepoCommand could use it to
populate the "ref=" field of pinned submodules.

Parse the value and store it in the RepoProject.

RepoProject is public API and the current constructors are not
telescopic, so we cannot just add a new constructor with an extra
argument. Use plain getter/setters.j

[1] https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.md#Element-project

Change-Id: Ia50b85b95bfd3710f9fbda2050be5950dd686941
org.eclipse.jgit.test/tst/org/eclipse/jgit/gitrepo/ManifestParserTest.java
org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java
org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java