summaryrefslogtreecommitdiffstats
path: root/docs/manifest-format.md
diff options
context:
space:
mode:
authorFredrik de Groot <fredrik.de.groot@aptiv.com>2023-05-31 16:56:34 +0200
committerMike Frysinger <vapier@google.com>2023-06-21 14:50:16 +0000
commitbe71c2f80fa115e8256211fd0e3116d93cfae93e (patch)
tree39769fb002ec24d520abde60cf6b0614c4c02558 /docs/manifest-format.md
parent696e0c48a9de4d20f3de65bc014ca2991d16f041 (diff)
downloadgit-repo-be71c2f80fa115e8256211fd0e3116d93cfae93e.tar.gz
manifest: enable remove-project using path
A something.xml that gets included by two different files, that both remove and add same shared project to two different locations, would not work prior to this change. Reason is that remove killed all name keys, even though reuse of same repo in different locations is allowed. Solve by adding optional attrib path to <remove-project name="foo" path="only_this_path" /> and tweak remove-project. Behaves as before without path, and deletes more selectively when remove path is supplied. As secondary feature, a project can now also be removed by only using path, assuming a matching project name can be found. Change-Id: I502d9f949f5d858ddc1503846b170473f76dc8e2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/375694 Tested-by: Fredrik de Groot <fredrik.de.groot@aptiv.com> Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'docs/manifest-format.md')
-rw-r--r--docs/manifest-format.md18
1 files changed, 15 insertions, 3 deletions
diff --git a/docs/manifest-format.md b/docs/manifest-format.md
index edcb28cb..36dae6de 100644
--- a/docs/manifest-format.md
+++ b/docs/manifest-format.md
@@ -109,8 +109,9 @@ following DTD:
109 <!ATTLIST extend-project upstream CDATA #IMPLIED> 109 <!ATTLIST extend-project upstream CDATA #IMPLIED>
110 110
111 <!ELEMENT remove-project EMPTY> 111 <!ELEMENT remove-project EMPTY>
112 <!ATTLIST remove-project name CDATA #REQUIRED> 112 <!ATTLIST remove-project name CDATA #IMPLIED>
113 <!ATTLIST remove-project optional CDATA #IMPLIED> 113 <!ATTLIST remove-project path CDATA #IMPLIED>
114 <!ATTLIST remove-project optional CDATA #IMPLIED>
114 115
115 <!ELEMENT repo-hooks EMPTY> 116 <!ELEMENT repo-hooks EMPTY>
116 <!ATTLIST repo-hooks in-project CDATA #REQUIRED> 117 <!ATTLIST repo-hooks in-project CDATA #REQUIRED>
@@ -473,7 +474,7 @@ of the repo client.
473 474
474### Element remove-project 475### Element remove-project
475 476
476Deletes the named project from the internal manifest table, possibly 477Deletes a project from the internal manifest table, possibly
477allowing a subsequent project element in the same manifest file to 478allowing a subsequent project element in the same manifest file to
478replace the project with a different source. 479replace the project with a different source.
479 480
@@ -481,6 +482,17 @@ This element is mostly useful in a local manifest file, where
481the user can remove a project, and possibly replace it with their 482the user can remove a project, and possibly replace it with their
482own definition. 483own definition.
483 484
485The project `name` or project `path` can be used to specify the remove target
486meaning one of them is required. If only name is specified, all
487projects with that name are removed.
488
489If both name and path are specified, only projects with the same name and
490path are removed, meaning projects with the same name but in other
491locations are kept.
492
493If only path is specified, a matching project is removed regardless of its
494name. Logic otherwise behaves like both are specified.
495
484Attribute `optional`: Set to true to ignore remove-project elements with no 496Attribute `optional`: Set to true to ignore remove-project elements with no
485matching `project` element. 497matching `project` element.
486 498