Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for uppercase 'head' when updating subprojects (fixes #12730) #13840

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/markdown/Wrap-dependency-system-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion mesonbuild/msubprojects.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ def update_git(self) -> bool:
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:
Expand Down
Loading