update: submodules
This commit is contained in:
parent
b3c5d37084
commit
02f36c63b6
1 changed files with 1 additions and 0 deletions
1
.zshrc
1
.zshrc
|
@ -371,6 +371,7 @@ __git__() {
|
||||||
git submodule foreach '
|
git submodule foreach '
|
||||||
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