git-notify
git-notify copied to clipboard
post-rewrite hook fails if repository does not have remote called `origin`
Need to come up with a better way to get a rebase commit log than what we do now: https://github.com/jevakallio/git-notify/blob/master/src/git.ts#L28
For the time being as a workaround, you can skip installing the post-rewrite hook altogether -- the use case for this is pretty niche, in most people's workflows they'll end up pulling the commits to a local branch before rebasing on top of their work, so they should see the message anyway.
Please 👍 this issue if you personally experienced it and want it fixed. Contributions also welcome.
Is the issue that origin
could have a different name or there is no origin
at all because they haven't added a remote?
@jordyvandomselaar both. I think the former is more likely since it's rare people work in detached repositories.
I'm not sure how to get the remote from which commits were previously pulled, so for convenience I just assumed origin
here.
@jevakallio I thought about it for a bit. Since the name could be anything and some projects can even have multiple "origins", perhaps it's a good idea to add a flag so the user can enter the name?