drupalorg-cli icon indicating copy to clipboard operation
drupalorg-cli copied to clipboard

Provide an option to apply a patch without committing

Open malcomio opened this issue 4 years ago • 3 comments

As a module maintainer, it would be useful to be able to apply a patch locally, without creating a separate branch and committing it, e.g. in preparation for committing the change to the main branch.

malcomio avatar May 11 '20 17:05 malcomio

This makes sense, as you currently can't merge the applied branch.

Would it make sense to add options to issue:apply or something like maintainer:commit (apply the patch, and use the Drupal.org commit message per #74)?

So we could do:

  • issue:apply --direct which applies the issue directly to the current branch and a separate command to get the Drupal.org git command

OR

  • maintainer:commit like issue:apply, but it applies the patch to the current branch and uses the Drupal.org git command

mglaman avatar May 11 '20 22:05 mglaman

I was thinking it should be options on issue:apply - I almost always want to test the patch locally before committing

malcomio avatar May 12 '20 06:05 malcomio

I support issue:apply --direct. I would still recommend maintainers to use the normal issue:apply command. After checking that everything is fine, it's just to merge the issue branch - or delete it if not.

Anyway, drupalorg-cli is all about convenience ;-)

hansfn avatar May 12 '20 08:05 hansfn