]> git.wh0rd.org - home.git/commitdiff
git-rb-all: handle symlinked .git
authorMike Frysinger <vapier@gentoo.org>
Mon, 15 Nov 2021 02:30:09 +0000 (21:30 -0500)
committerMike Frysinger <vapier@gentoo.org>
Mon, 15 Nov 2021 02:30:09 +0000 (21:30 -0500)
.bin/git-rb-all

index c9071e10f5ab74b73cabd8abcb95692a2d48dfa2..5c3f305a01866ad42856f77215f5b881603d95a5 100755 (executable)
@@ -139,6 +139,10 @@ def worktree_is_local(worktree: str) -> bool:
     if not worktree:
         return True
 
+    # If .git is a symlink, worktree result might be the target.
+    if worktree == str(git_dir().resolve()):
+        return True
+
     # NB: worktree path is supposed to be absolute from for-each-ref, but it's
     # not always, so we have to resolve it.  https://crbug.com/git/88
     worktree = (git_dir() / worktree).resolve()