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

Add magithub-browse-file #377

Merged
merged 2 commits into from
Sep 22, 2018
Merged

Conversation

manateelazycat
Copy link
Contributor

No description provided.

@vermiculus
Copy link
Owner

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.

- browsing directories
- browsing files from magit-status buffers
@vermiculus vermiculus merged commit 46e6ea5 into vermiculus:master Sep 22, 2018
@vermiculus
Copy link
Owner

Merged, thanks!

@manateelazycat
Copy link
Contributor Author

manateelazycat commented Sep 22, 2018

@vermiculus Thank you so much!

@stardiviner
Copy link
Contributor

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?

@vermiculus
Copy link
Owner

What do those functions do?

@stardiviner
Copy link
Contributor

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.

@vermiculus
Copy link
Owner

vermiculus commented Sep 23, 2018

magihtub-commit-browse already exists; just press w on any commit section.

I'll look at implementing a magithub-browse-file-blame.

@vermiculus
Copy link
Owner

Added in 58b9750.

@stardiviner
Copy link
Contributor

stardiviner commented Sep 24, 2018

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

@vermiculus
Copy link
Owner

Can you expand on how it is 'invalid'? I don't understand what you're doing or what you expect to happen.

@stardiviner
Copy link
Contributor

The second URL is opened by magithub which provide an invalid commit hash in URL. So I open URL, GitHub shows nothing there.

@manateelazycat manateelazycat deleted the patch-1 branch September 24, 2018 14:37
@vermiculus
Copy link
Owner

Ensure that commit has been pushed

@stardiviner
Copy link
Contributor

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.

@vermiculus
Copy link
Owner

please open an issue

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

Successfully merging this pull request may close these issues.

None yet

3 participants