diff options
author | Teddy Wing | 2018-04-06 01:35:26 +0200 |
---|---|---|
committer | Teddy Wing | 2018-04-06 01:35:26 +0200 |
commit | bcb1336bd008efde95daae0599a656ca67c2d94f (patch) | |
tree | c45963c66abc7b3325b98935980f5cdc34c5af35 /bundle | |
parent | 2e3d5630df8ce9ffacc9f03c5f7ec5327f0b9c59 (diff) | |
download | dotvim-bcb1336bd008efde95daae0599a656ca67c2d94f.tar.bz2 |
github-url: Add `--no-patch` to `git show` command
If there's a diff in the index, that will get included in the output of
this command, meaning that just after the SHA, there will be a
multi-line diff string that completely messes up the constructed URL.
Use the `--no-patch` flag to suppress diff output.
Diffstat (limited to 'bundle')
-rw-r--r-- | bundle/github-url/autoload/github_url.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bundle/github-url/autoload/github_url.vim b/bundle/github-url/autoload/github_url.vim index 11110a8..c83c6f6 100644 --- a/bundle/github-url/autoload/github_url.vim +++ b/bundle/github-url/autoload/github_url.vim @@ -14,7 +14,7 @@ endfunction " argument comes from a `:command`'s `<count>`, and tells the function whether " a range was given. function! s:FileURL(include_lines, start_line, end_line) - let current_sha = system('git show --format="format:%H"') + let current_sha = system('git show --no-patch --format="format:%H"') let current_sha = substitute(current_sha, '\n$', '', '') let current_filename = expand('%') let lines = '' |