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

commit message support #162

Open
cgwalters opened this issue Jul 16, 2015 · 4 comments
Open

commit message support #162

cgwalters opened this issue Jul 16, 2015 · 4 comments

Comments

@cgwalters
Copy link
Member

OSTree has them, we should support people writing them for a few reasons.

One use case I see is it's very common to maintain metadata in a git repository, and it'd be nice to have that git repo URL + commit in the message.

@mbarnes
Copy link
Contributor

mbarnes commented Jul 16, 2015

@cgwalters
Copy link
Member Author

There was a recent thread on this on ostree-list.

Related to the git repo/URL, we did land #676 - though we haven't talked about showing that in the UI in any way.

It does seem clear we should at least have the equivalent of the new ostree commit -F.

@cgwalters
Copy link
Member Author

In the short term, if anyone wants to use commit messages right now, you can hack it like this, by having rpm-ostree write the commit, then overwrite it but use the contents:

rpm-ostree compose --repo=repo tree <treefile>
ostree --repo=repo commit -s <subject> -F <commit body file> --tree=ref=exampleos/42/x86_64/demo --parent exampleos/42/x86_64/demo^

This general principle applies broadly - you can use rpm-ostree just to generate content, and then ostree tooling to manipulate/edit/promote it after.

Concrete cmdline I just tested:

# echo 'Commit body here!' > body.txt
# ostree --repo=repo commit -b fedora/rawhide/x86_64/atomic-host -s 'My awesome Fedora Atomic Host build!' -F body.txt --tree=ref=fedora/rawhide/x86_64/atomic-host --parent $(ostree --repo=repo rev-parse fedora/rawhide/x86_64/atomic-host^)

@jlebon
Copy link
Member

jlebon commented Mar 24, 2017

You can make the "rpm-ostree just generates content" even more explicit by using --write-commitid-to (which also will avoid needing --parent). E.g.:

rpm-ostree compose --repo=repo tree --write-commitid-to=csum <treefile>
ostree --repo=repo commit -b my/actual/branch -F body.txt -s "summary!" --tree=ref=$(cat csum)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants