While investigating https://github.com/f-person/git-blame.nvim/issues/117 I noticed that the urls generated by GitBlameOpenCommitURL, GitBlameOpenFileURL, GitBlameCopyCommitURL, and GitBlameCopyFileURL can sometimes have incorrect fallback values when used outside of a git repository. I fixed these commands so that the provide a reasonable fallback value or log to the command output.
Verification
Run the commands above and verify they provide a reasonable output for git repositories and other non-repository directories!
Problem
While investigating https://github.com/f-person/git-blame.nvim/issues/117 I noticed that the urls generated by
GitBlameOpenCommitURL
,GitBlameOpenFileURL
,GitBlameCopyCommitURL
, andGitBlameCopyFileURL
can sometimes have incorrect fallback values when used outside of a git repository. I fixed these commands so that the provide a reasonable fallback value or log to the command output.Verification
Run the commands above and verify they provide a reasonable output for git repositories and other non-repository directories!