AdrianVovk commented on issue #1857:
URL: https://github.com/apache/buildstream/issues/1857#issuecomment-1668503452
For now, the work around is to use a script like this from a git pre-commit
hook:
```python3
#!/usr/bin/env python3
import sys
import pathlib
from ruamel.yaml import YAML
path = pathlib.Path("project.refs")
yaml = YAML()
refs = yaml.load(path)
refs["projects"]["carbonOS"] =
dict(sorted(refs["projects"]["carbonOS"].items()))
yaml.dump(refs, path)
```
However, this isn't ideal because:
1) pre-commit hooks aren't necessarily going to be installed
2) pre-commit hooks mutate commits in potentially unpredictable ways, which
can easily mess with things like rebases, `git add -p`, etc.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]