tonchis/vim-to-github — pull request #7 by k0kubun (2014-11-13 14:27:08+00:00)
Title: Substitute repository root from file_path

Fixes #6.

|Key|Value|
|:---|:---|
| git rev-parse --show-toplevel | /Users/k0kubun/src/github.com/tonchis/vim-to-github |
|expected file_name | plugin/to-github.vim |
| actual file_name (`bufname('%')`) | /Users/k0kubun/src/github.com/tonchis/vim-to-github/plugin/to-github.vim |

You can detect repository root path by `git rev-parse --show-toplevel`.
If `file_path` contains the string, it is invalid for GitHub url and the same as an unnecessary part of unexpected url.

Thus I removed a repository root path from `file_path` if exists.