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

git-node: suggest -x and --autosquash for git rebase #237

Merged
merged 1 commit into from
Apr 19, 2018

Conversation

joyeecheung
Copy link
Member

  • Suggest to add -x "git node land --amend" which will put
    exec git node land --amend on every picked commit.
  • Suggest to add --autosquash if fixup! or squash! appears
    in the commit messages, which will add fixup or squash actions
    to corresponding commits if they match the autosquash rules.

Used this to land nodejs/node#20121 . Worked pretty well.

- Suggest to add `-x "git node land --amend"` which will put
  `exec git node land --amend` on every picked commit.
- Suggest to add `--autosquash` if `fixup!` or `squash!` appears
  in the commit messages, which will add fixup or squash actions
  to corresponding commits if they match the autosquash rules.
@joyeecheung
Copy link
Member Author

BTW the -x idea came from @addaleax

@codecov
Copy link

codecov bot commented Apr 19, 2018

Codecov Report

Merging #237 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #237   +/-   ##
=======================================
  Coverage   88.55%   88.55%           
=======================================
  Files          19       19           
  Lines         708      708           
=======================================
  Hits          627      627           
  Misses         81       81

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67bc061...2876568. Read the comment docs.

@joyeecheung joyeecheung merged commit 5f8cf80 into nodejs:master Apr 19, 2018
@srl295
Copy link
Member

srl295 commented Oct 24, 2018

Using MitMaro/git-interactive-rebase-tool#62 , I got this result:

$ git rebase upstream/master -i -x "git node land --amend"
Error reading file, /Users/srl/src/node/.git/rebase-merge/git-rebase-todo
Reason: Invalid action: exec
Could not execute editor

It's not a problem with git-node, but it might be worth noting in case someone runs into this. (I didn't file a separate ticket for this, but I could.)

Note you can work around this temporarily with something like:

env GIT_SEQUENCE_EDITOR=emacs git rebase -i b -x "git node land --amend"

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.

3 participants