Skip to content

Summary view for the repository located in the working directory and the one linked to the current buffer #2209

Closed Answered by tpope
iamFIREcracker asked this question in Q&A
Discussion options

You must be logged in to vote

The thing that is changing is the status buffer is moving from .git/index to a fugitive:// URL. URLs aren't relative to the current working directory, so there's no drop in replacement. Best you could do is wrap it in a command:

command! -bang -bar GCWDStatus
      \ if empty(FugitiveExtractGitDir(getcwd())) |
      \   echoerr 'Not in a Git repository' |
      \ else |
      \   exe 'edit<bang>' fnameescape(FugitiveFind(':', FugitiveExtractGitDir(getcwd()))) |
      \ endif

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@iamFIREcracker
Comment options

Answer selected by iamFIREcracker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants