]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

find_project_root: allow .git to be a file (#1217)
authorhauntsaninja <hauntsaninja@users.noreply.github.com>
Thu, 2 Jan 2020 22:33:30 +0000 (14:33 -0800)
committerJelle Zijlstra <jelle.zijlstra@gmail.com>
Thu, 2 Jan 2020 22:33:30 +0000 (14:33 -0800)
Fixes #1213

black.py

index 1c35643725c62acf5a6e83ad13f91afbf70ad8f1..11db7e4b8035b9c7604226f0e7fbe01c513e1eba 100644 (file)
--- a/black.py
+++ b/black.py
@@ -3597,7 +3597,7 @@ def find_project_root(srcs: Iterable[str]) -> Path:
         # Append a fake file so `parents` below returns `common_base_dir`, too.
         common_base /= "fake-file"
     for directory in common_base.parents:
-        if (directory / ".git").is_dir():
+        if (directory / ".git").exists():
             return directory
 
         if (directory / ".hg").is_dir():