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

[amtool] (#10231) Prevent pushes if there are uncommitted changes #10232

Merged
merged 2 commits into from
Mar 17, 2025

Conversation

ojhunt
Copy link

@ojhunt ojhunt commented Mar 11, 2025

Prevent pushing the resolution if there are any uncommitted changes still in the tree

Copy link

@azharudd azharudd left a comment

Choose a reason for hiding this comment

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

Left one comment. Also, can you please fix the punctuation (missing period) in the comment and the log messages. LGTM otherwise.

@ojhunt ojhunt force-pushed the users/ojhunt/report-unstaged-changes-mk2 branch from e7b56a0 to 478f361 Compare March 11, 2025 21:28
@ojhunt ojhunt requested a review from azharudd March 11, 2025 21:28
@ojhunt ojhunt force-pushed the users/ojhunt/report-unstaged-changes-mk2 branch from 478f361 to dd2214d Compare March 11, 2025 21:29
apple-ci/amtool Outdated
@@ -327,6 +327,15 @@ def main():
except GitError:
pass

# Check if we have any unstaged or uncommitted changes in the tree.
try:

Choose a reason for hiding this comment

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

We don't need the try/except block.

Choose a reason for hiding this comment

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

git diff-index HEAD returns 0 in either case.

@ojhunt ojhunt force-pushed the users/ojhunt/report-unstaged-changes-mk2 branch from c950d76 to 43fca46 Compare March 16, 2025 22:28
@ojhunt ojhunt requested a review from azharudd March 16, 2025 22:28
@azharudd azharudd merged commit e8fcc51 into next Mar 17, 2025
@azharudd azharudd deleted the users/ojhunt/report-unstaged-changes-mk2 branch March 17, 2025 21:15
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.

2 participants