summaryrefslogtreecommitdiffstats
path: root/docs/manifest-format.md
diff options
context:
space:
mode:
authorMichael Kelly <mkelly@arista.com>2021-06-30 01:58:28 -0700
committerMichael Kelly <mkelly@arista.com>2021-07-08 16:48:21 +0000
commit06da9987f6be6ddc1637e8ae02646d6dfab09862 (patch)
treebe93f68a568f27341b61fa367a42dcdfe75df234 /docs/manifest-format.md
parent58929732123780497ba08ed9c2d24f4bc65971a1 (diff)
downloadgit-repo-06da9987f6be6ddc1637e8ae02646d6dfab09862.tar.gz
Gracefully ignore bad remove-project line
Sometimes, we don't care if the remove project is referring to a non-existing project and we can just ignore it. This change allows us to ignore remove-project entries if the project that they refer to doesn't exist, making them effectively a no-op. Because this change breaks existing configuration, we allow this to be configuration controlled using the `optional` attribute in the remove-project tag. Change-Id: I6313a02983e81344eadcb4e47d7d6b037ee7420e Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/310964 Tested-by: Michael Kelly <mkelly@arista.com> Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'docs/manifest-format.md')
-rw-r--r--docs/manifest-format.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/manifest-format.md b/docs/manifest-format.md
index 45fd615e..c3bfcff0 100644
--- a/docs/manifest-format.md
+++ b/docs/manifest-format.md
@@ -96,6 +96,7 @@ following DTD:
96 96
97 <!ELEMENT remove-project EMPTY> 97 <!ELEMENT remove-project EMPTY>
98 <!ATTLIST remove-project name CDATA #REQUIRED> 98 <!ATTLIST remove-project name CDATA #REQUIRED>
99 <!ATTLIST remove-project optional CDATA #IMPLIED>
99 100
100 <!ELEMENT repo-hooks EMPTY> 101 <!ELEMENT repo-hooks EMPTY>
101 <!ATTLIST repo-hooks in-project CDATA #REQUIRED> 102 <!ATTLIST repo-hooks in-project CDATA #REQUIRED>
@@ -393,6 +394,9 @@ This element is mostly useful in a local manifest file, where
393the user can remove a project, and possibly replace it with their 394the user can remove a project, and possibly replace it with their
394own definition. 395own definition.
395 396
397Attribute `optional`: Set to true to ignore remove-project elements with no
398matching `project` element.
399
396### Element repo-hooks 400### Element repo-hooks
397 401
398NB: See the [practical documentation](./repo-hooks.md) for using repo hooks. 402NB: See the [practical documentation](./repo-hooks.md) for using repo hooks.