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

post-rewrite hook fails if repository does not have remote called origin #1

Open
jevakallio opened this issue Feb 28, 2021 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@jevakallio
Copy link
Owner

jevakallio commented Feb 28, 2021

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.

@jevakallio jevakallio added bug Something isn't working good first issue Good for newcomers labels Feb 28, 2021
@jordyvandomselaar
Copy link

Is the issue that origin could have a different name or there is no origin at all because they haven't added a remote?

@jevakallio
Copy link
Owner Author

@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.

@jordyvandomselaar
Copy link

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants