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

Log the wallet git revision on startup #1541

Merged
merged 2 commits into from
Apr 22, 2022
Merged

Conversation

bmwill
Copy link
Contributor

@bmwill bmwill commented Apr 22, 2022

Fixes: #1540

@bmwill bmwill requested a review from mystenmark April 22, 2022 17:22
let output = Command::new("git")
.args(&["rev-parse", "--short", "HEAD"])
.output()
.unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I suggest also doing the equivalent of:

        git diff-index --quiet HEAD > /dev/null 2>&1
        DIRTY=$?

And appending -dirty to the rev if the repo is dirty?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's a good call out

@mystenmark
Copy link
Contributor

One suggestion (which is not super critical) and then LGTM

@bmwill bmwill enabled auto-merge (rebase) April 22, 2022 18:03
@bmwill bmwill merged commit 96611e0 into MystenLabs:main Apr 22, 2022
@bmwill bmwill deleted the wallet-git-rev branch April 22, 2022 19:02
@huitseeker huitseeker mentioned this pull request Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add git commit to be logged when wallet starts up
2 participants