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

custom commit url template string doesn't work if remote is not named 'origin' #14

Open
noseglid opened this issue Jul 18, 2014 · 4 comments

Comments

@noseglid
Copy link

I have only one remote, named 'gerrit' which points to my Gerrit code review git repo. We also have a cgit connected to this which provides an HTTP interface to the repo. I utilized the custom url in settings: 'https:///cgit.cgi/<%-repo%>/gerrit.git/commit/?id=<%-revision%>' (nifty feature by the way). When I now click on a commit after bringing up the git blame, it gives me 'Uncaught TypeError: Cannot call method 'match' of null' in '/home/alexo/.atom/packages/git-blame/lib/util/RemoteRevision.js:65'.

I tried changing the name on my remote to 'origin', where it worked fine (and correctly opened my browser to the specified commit).

@alexcorre
Copy link
Owner

I'll add a user setting for a custom remote name if origin fails. That should solve your problem right?

@noseglid
Copy link
Author

Yep, that'd work fine. Thanks.

@alexcorre
Copy link
Owner

Short term I will add this setting in the next day or two.

I have another question though...would this be across ALL your projects? Do you always have your main remote named 'gerrit'? Or is this only for a project here or there.

Long run I'm thinking this should be project specific. Having a discussion on how best to make this possible in #18 potentially using git config or git-blame for atom config that is checked into the project. Thoughts?

@noseglid
Copy link
Author

noseglid commented Aug 9, 2014

The remote is not always named gerrit. There is also times where I have multiple remotes for the same project. Perhaps a way to specify which remote I want to use for blame? (In my case they are very often mirrors and blame would show same result regardless of which remote it used).

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

No branches or pull requests

2 participants