Closed manateelazycat closed 5 years ago
Merged, thanks!
@vermiculus Thank you so much!
There is a extension named github-browse-file
, it also supports github-browse-file-blame
and github-browse-commit
. I hope it can be in magithub
too. WDYT?
What do those functions do?
Here is the docstring:
(github-browse-commit)
Show the GitHub page for the current commit.
(github-browse-file-blame &optional FORCE-MASTER)
Show the GitHub blame page for the current file. The URL for the webpage is
added to the kill ring. With a prefix argument, "master" is used
regardless of the current branch.
In Transient Mark mode, if the mark is active, highlight the contents of the
region.
magihtub-commit-browse
already exists; just press w
on any commit section.
I'll look at implementing a magithub-browse-file-blame
.
@vermiculus Thanks for fast feature adding. I take a test, opened error URL.
When I open blame from GitHub, it is https://github.com/stardiviner/emacs.d/blame/9461bc9408aa995a654cb5270d79916be8426143/init.el
And I use magithub-browse-file-blame
It is https://github.com/stardiviner/emacs.d/blame/f92a80c18ddc7faae5ed30c76cad47bd4551607f/init.el#L1-L1
The commit is different and invalid.
Can you expand on how it is 'invalid'? I don't understand what you're doing or what you expect to happen.
The second URL is opened by magithub which provide an invalid commit hash in URL. So I open URL, GitHub shows nothing there.
Ensure that commit has been pushed
I'm sure that line (with or without region selected) text is pushed already. But seems the commit hash is wrong. I indeed have unpushed content of the file. But it should not work like this.
please open an issue
I've done some light code cleanup (break up long lines, etc.) and revised the docstring. I'll merge after I finish testing and plan to push any necessary fixes to this branch.