From: Immaculate Mecha Date: Fri, 30 Oct 2026 13:37:18 GMT Subject: [Outreachy] GIT_DIR inherited by shell aliases in linked worktrees Message-ID: I'm considering a small Outreachy contribution around repository environment handling in external shell aliases. I reproduced the following behaviour: Create a repository with a linked worktree. Run an external shell alias from inside that worktree. Have the alias execute git -C ../TestBaseRepo rev-parse. The nested command reports the calling worktree's Git directory and common directory, even though --show-toplevel correctly identifies TestBaseRepo. I traced this to the inherited GIT_DIR variable. Unsetting GIT_DIR before running the nested command makes all three results point to the target repository. I found the earlier 2020 discussion about GIT_DIR inheritance in aliases, but I'm interested in whether there is still room for a focused contribution, particularly around regression tests for linked worktrees. Would this be a suitable microproject for Outreachy? Thank you, Immaculate Mecha