spr icon indicating copy to clipboard operation
spr copied to clipboard

Adding --no-verify on `git spr push`?

Open WesleyYue opened this issue 3 years ago • 7 comments

I have a pre-commit hook, and occasionally I want to be able to open draft PRs without my commits passing all of the pre-commit checks. Is there a way to run git spr push with --no-verify?

WesleyYue avatar Mar 07 '23 21:03 WesleyYue

@WesleyYue - does the pre-commit hook run when you commit the change or when you push the change to origin?

ejoffe avatar Apr 18 '23 20:04 ejoffe

When I commit the change – it's the standard git pre-commit hook

WesleyYue avatar Apr 25 '23 21:04 WesleyYue

spr doesn't call git commit, so I'm not sure how the extra flag helps?

ejoffe avatar Apr 25 '23 21:04 ejoffe

Doesn't it commit as part of the rebase steps? I think I meant to say git spr update in the original post

WesleyYue avatar Apr 25 '23 22:04 WesleyYue

git spr update calls git push to update the branches on GitHub. But doesn't call git commit, that you have to do on your own before you call git spr update.

ejoffe avatar Apr 25 '23 22:04 ejoffe

Ok, let me do some more testing. I've been off and haven't shipped code in a while so don't fully remember what the issue was.

WesleyYue avatar Apr 25 '23 22:04 WesleyYue

I ran into this today, but I'm not 100% sure what triggers it b/c I haven't fully dug in on how the internals of this tool works. Putting my logs here. The pre-commit occurs during the last rebase step here:

> git rev-parse --show-toplevel
> git fetch
> git branch --no-color
> git rebase origin/develop --autostash
> github fetch pull requests
> git branch --no-color
> git branch --no-color
> git log --format=medium --no-color origin/develop..HEAD
> git rebase origin/develop -i --autosquash --autostash

This is not a super huge problem so I don't think it's worth prioritizing over other features/bug fixes but just wanted to post an update with more details and logs.

WesleyYue avatar May 20 '23 21:05 WesleyYue