update: submodules
This commit is contained in:
parent
02f36c63b6
commit
a2fd078056
1 changed files with 1 additions and 1 deletions
2
.zshrc
2
.zshrc
|
@ -369,9 +369,9 @@ __git__() {
|
||||||
|
|
||||||
echo "${CYAN}${BOLD}-- Checking submodule branches... --${NC}"
|
echo "${CYAN}${BOLD}-- Checking submodule branches... --${NC}"
|
||||||
git submodule foreach '
|
git submodule foreach '
|
||||||
|
echo "${RED}Submodule: $name ${NC}"
|
||||||
branch=$(git symbolic-ref --short HEAD 2>/dev/null || echo "detached")
|
branch=$(git symbolic-ref --short HEAD 2>/dev/null || echo "detached")
|
||||||
if [ "$branch" = "detached" ]; then
|
if [ "$branch" = "detached" ]; then
|
||||||
echo "${RED}Submodule: $name ${NC}"
|
|
||||||
default_branch=$(git config -f $toplevel/.gitmodules submodule.$name.branch || echo "main")
|
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}"
|
echo "${RED}${BOLD}Submodule $name is detached. Checking out ${YELLOW} $default_branch${RED}...${NC}"
|
||||||
git checkout $default_branch
|
git checkout $default_branch
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue