@san-siva/gitsy 1.0.17 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/g-pull +2 -0
- package/bin/g-rmf +1 -0
- package/bin/g-rto +1 -0
- package/bin/utils +23 -0
- package/package.json +1 -1
package/bin/g-pull
CHANGED
package/bin/g-rmf
CHANGED
package/bin/g-rto
CHANGED
package/bin/utils
CHANGED
|
@@ -638,6 +638,29 @@ get_repo_name() {
|
|
|
638
638
|
return 0
|
|
639
639
|
}
|
|
640
640
|
|
|
641
|
+
sync_submodules() {
|
|
642
|
+
local step_number=$1
|
|
643
|
+
|
|
644
|
+
if [ -z "$step_number" ]; then
|
|
645
|
+
step_number=0
|
|
646
|
+
fi
|
|
647
|
+
|
|
648
|
+
# Skip if no submodules exist
|
|
649
|
+
if [ ! -f ".gitmodules" ] || ! grep -q '\[submodule' .gitmodules 2>/dev/null; then
|
|
650
|
+
return 0
|
|
651
|
+
fi
|
|
652
|
+
|
|
653
|
+
print_message "${BLUE}Syncing submodules...${NC}" $step_number
|
|
654
|
+
|
|
655
|
+
if ! git -c color.ui=always submodule update --init 2>&1 | indent; then
|
|
656
|
+
print_message "" -1
|
|
657
|
+
print_message "${RED}Failed to sync submodules. [Fail]${NC}" -1
|
|
658
|
+
exit 1
|
|
659
|
+
fi
|
|
660
|
+
|
|
661
|
+
print_message "${GREEN}Submodules synced successfully.${NC}" 0
|
|
662
|
+
}
|
|
663
|
+
|
|
641
664
|
get_repo_info() {
|
|
642
665
|
local -n git_root_ref=$1
|
|
643
666
|
local -n current_dir_ref=$2
|