 update: submodules

This commit is contained in:
piecka 2025-05-13 15:59:41 +02:00
parent b3c5d37084
commit 02f36c63b6

1
.zshrc
View file

@ -371,6 +371,7 @@ __git__() {
git submodule foreach '
branch=$(git symbolic-ref --short HEAD 2>/dev/null || echo "detached")
if [ "$branch" = "detached" ]; then
echo "${RED}Submodule: $name ${NC}"
default_branch=$(git config -f $toplevel/.gitmodules submodule.$name.branch || echo "main")
echo "${RED}${BOLD}Submodule $name is detached. Checking out ${YELLOW} $default_branch${RED}...${NC}"
git checkout $default_branch