From 6efb1ad0b8ce38ef4944596a26dc700648aa6de5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 14 Nov 2021 21:30:09 -0500 Subject: [PATCH] git-rb-all: handle symlinked .git --- .bin/git-rb-all | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.bin/git-rb-all b/.bin/git-rb-all index c9071e1..5c3f305 100755 --- a/.bin/git-rb-all +++ b/.bin/git-rb-all @@ -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() -- 2.39.5