Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugin/to-github.vim
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ function! ToGithub(count, line1, line2, ...)
return 'Too many arguments'
endif

" Get the branch and path, and form the complete url.
let branch = s:run('git symbolic-ref --short HEAD')
" Get the commit and path, and form the complete url.
let branch = s:run('git show-ref --hash HEAD')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shioyama good catch! Thank you. Could you please also change the variable name branch to commit?

I'll merge after that!

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shioyama I'll merge now and take care of it since I already have a few other changes in queue :)

let repo_root = s:run('git rev-parse --show-toplevel')
let file_path = bufname('%')
let file_path = substitute(file_path, repo_root . '/', '', 'e')
Expand Down