Work trees and submodules have two things that could be called the Git
dir: the directory itself, and the ".git" at the root of the work tree.
Introduce "fugitive_dir" as our name for the one we consider canonical.
This is not and can never be 100% perfect. There's no way to work back
from a file like info/exclude COMMIT_EDITMSG to the work tree. So
core.worktree continues to be recommended.
References: https://github.com/tpope/vim-fugitive/issues/1920
Move "Unpushed" sections above "Unpulled".
Show commits that are unpushed anywhere when no upstream is set.
Provide czs map as :Git stash push --staged.
Support the MSYS Vim bundled with Git for Windows.
Turn remaining deprecated commands (:Gbrowse, etc.) into error stubs.
This is intended to free up FugitiveGitDir() to refer to the ".git" file
in that work tree and submodule repositories use. I wish I had better
names for these two. Settling for "Actual" as that at least has a
pleasing 6 letter symmetry with "Common".
FugitiveVimPath() is intended to potentially convert between UNIX and
Windows paths in mixed environments. Let's separate uses that require
that from those that simply normalize slashes.
The `:p` flag resolves symlinks, so the resolve() call is a no-op, and
the subsequent conditional is always false. It also appears to be no
longer necessary, though I'd have to do a bit more digging to figure out
why.
The 2 slash version slots the drive letter into the host field, which
I'm worried will cause problems when the URLs are used non-opaquely, for
example, with an LSP. Let's start transitioning to the convention used
by file:// URLs.
Using $GIT_DIR/index for the summary buffer has 2 problems:
* It requires a BufReadCmd for all files named "index", necessitating
special handling for false positives.
* It forces us to resolve ".git" files and symlinks, decoupling us from
the worktree and thus forcing us to depend on `core.worktree`. Git
always sets this when necessary, but users and third-party tooling
sometimes do not.
Using a fugitive:// URL for the buffer solves both.
This is a large, breaking change, so let's leave $GIT_DIR/index as the
default for now.
The requires dropping support for b:netrw_curdir, which was added in
fecd42864a for the vague reason of
handling "unusually named netrw buffers". I'll figure out what to do
about those alleged buffers when one of them surfaces again.