aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java28
2 files changed, 29 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java
index 7402c760c3..b033177e05 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java
@@ -178,6 +178,8 @@ public class ManifestParser extends DefaultHandler {
.setRecommendShallow(attributes.getValue("clone-depth"));
currentProject
.setUpstream(attributes.getValue("upstream"));
+ currentProject
+ .setDestBranch(attributes.getValue("dest-branch"));
break;
case "remote":
String alias = attributes.getValue("alias");
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java
index b96faab452..d8fec78493 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java
@@ -39,6 +39,7 @@ public class RepoProject implements Comparable<RepoProject> {
private final List<CopyFile> copyfiles;
private final List<LinkFile> linkfiles;
private String upstream;
+ private String destBranch;
private String recommendShallow;
private String url;
private String defaultRevision;
@@ -402,6 +403,17 @@ public class RepoProject implements Comparable<RepoProject> {
}
/**
+ * Return the dest-branch attribute of the project
+ *
+ * @return the dest-branch value if present, null otherwise.
+ *
+ * @since 7.0
+ */
+ public String getDestBranch() {
+ return this.destBranch;
+ }
+
+ /**
* Set the upstream attribute of the project
*
* Name of the git ref in which a sha1 can be found, when the revision is a
@@ -412,10 +424,24 @@ public class RepoProject implements Comparable<RepoProject> {
*
* @since 7.0
*/
- void setUpstream(String upstream) {
+ public void setUpstream(String upstream) {
this.upstream = upstream;
}
+ /**
+ * Set the dest-branch attribute of the project
+ *
+ * Name of a Git branch.
+ *
+ * @param destBranch
+ * value of the attribute in the manifest
+ *
+ * @since 7.0
+ */
+ public void setDestBranch(String destBranch) {
+ this.destBranch = destBranch;
+ }
+
private String getPathWithSlash() {
if (path.endsWith("/")) { //$NON-NLS-1$
return path;