From: Mike Frysinger Date: Mon, 15 Nov 2021 02:30:09 +0000 (-0500) Subject: git-rb-all: handle symlinked .git X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6efb1ad0b8ce38ef4944596a26dc700648aa6de5;p=home.git git-rb-all: handle symlinked .git --- 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()