diff options
| author | andy5995 <arch_stanton5995@proton.me> | 2024-10-30 00:44:02 -0500 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2024-11-06 18:03:26 +0200 |
| commit | f0851c9e4b1760c552f7921e6b6a379b006ba014 (patch) | |
| tree | 67597bcd999b89ebc5c76385e518f6642c6f3353 | |
| parent | bfce1450ac68c1da7151b7ad1943f47bdd31f192 (diff) | |
| download | meson-f0851c9e4b1760c552f7921e6b6a379b006ba014.tar.gz | |
Check for uppercase 'head' when updating subprojects
| -rw-r--r-- | docs/markdown/Wrap-dependency-system-manual.md | 4 | ||||
| -rwxr-xr-x | mesonbuild/msubprojects.py | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/docs/markdown/Wrap-dependency-system-manual.md b/docs/markdown/Wrap-dependency-system-manual.md index c1652c1c3..73358e7cf 100644 --- a/docs/markdown/Wrap-dependency-system-manual.md +++ b/docs/markdown/Wrap-dependency-system-manual.md @@ -66,7 +66,7 @@ An example wrap-git will look like this: ```ini [wrap-git] url = https://github.com/libfoobar/libfoobar.git -revision = head +revision = HEAD depth = 1 ``` @@ -124,7 +124,7 @@ case, the directory will be copied into `subprojects/` before applying patches. - `url` - name of the wrap-git repository to clone. Required. - `revision` - name of the revision to checkout. Must be either: a valid value (such as a git tag) for the VCS's `checkout` command, or - (for git) `head` to track upstream's default branch. Required. + (for git) `HEAD` to track upstream's default branch. Required. ### Specific to wrap-git - `depth` - shallowly clone the repository to X number of commits. This saves bandwidth and disk diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py index c15415485..c74283c29 100755 --- a/mesonbuild/msubprojects.py +++ b/mesonbuild/msubprojects.py @@ -324,7 +324,8 @@ class Runner: self.log(' -> Not a git repository.') self.log('Pass --reset option to delete directory and redownload.') return False - revision = self.wrap.values.get('revision') + revision_val = self.wrap.values.get('revision') + revision = revision_val if revision_val.upper() != 'HEAD' else 'HEAD' url = self.wrap.values.get('url') push_url = self.wrap.values.get('push-url') if not revision or not url: |
