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

Allow users to skip the cleanup commit on restore #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rm-you
Copy link

@rm-you rm-you commented Jul 16, 2018

That commit can cause problems when using ply with some automation systems.

That commit can cause problems when using ply with some automation systems.
Copy link

@SpamapS SpamapS left a comment

Choose a reason for hiding this comment

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

I like it. Just a few silly suggestions. Overall this seems like a nice win for using ply in https://github.com/openstack-infra/zuul

@@ -295,7 +295,8 @@ def _ensure_name_and_email_set(self):
raise exc.GitConfigRequired('user.name')

def restore(self, three_way_merge=True, commit_msg=None,
fetch_remotes=True, customize_commit_msg=False):
fetch_remotes=True, customize_commit_msg=False,
no_commit=False):
Copy link

Choose a reason for hiding this comment

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

no_commit makes a bit of a double-negative when using logical operators. How about skip_commit?

Copy link
Author

Choose a reason for hiding this comment

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

I actually had skip_commit first, but renamed it to no_commit because I like --no-commit as the CLI arg better (there's already some "skip" terminology in ply, and I'd rather avoid confusion). Also, it seems the same amount of negativity... 😐

@@ -384,7 +385,9 @@ def restore(self, three_way_merge=True, commit_msg=None,
template = None

# Determine whether we need to prompt the user to edit commit message
if commit_msg:
if no_commit:
Copy link

Choose a reason for hiding this comment

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

See above for the rename suggestion of no_commit. After that, how about we skip the pass with:

if commit_msg and not skip_commit:

Copy link
Author

@rm-you rm-you Jul 16, 2018

Choose a reason for hiding this comment

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

Yeah, I was avoiding rewording the "else" at the end, but I can just change it to "elif not no_commit" I guess...

@rm-you
Copy link
Author

rm-you commented Jul 19, 2018

@rconradharris Any chance we can merge this change? :)

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