File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,19 @@ if [ -t 0 ] && [ "$1" = "/bin/bash" ]; then
5858 echo -e " ${CYAN} Repository:${NC} $REPO "
5959 echo -e " ${CYAN} Branch:${NC} $BRANCH "
6060
61- # Kurzer Status
62- CHANGES=$( git status --porcelain 2> /dev/null | wc -l)
63- if [ " $CHANGES " -gt 0 ]; then
64- echo -e " ${YELLOW} Changes:${NC} $CHANGES uncommitted file(s)"
61+ # Kurzer Status (mit Timeout für große Repos)
62+ if CHANGES=$( timeout 3 git status --porcelain 2> /dev/null | head -100 | wc -l) ; then
63+ if [ " $CHANGES " -gt 0 ]; then
64+ if [ " $CHANGES " -ge 100 ]; then
65+ echo -e " ${YELLOW} Changes:${NC} 100+ uncommitted file(s)"
66+ else
67+ echo -e " ${YELLOW} Changes:${NC} $CHANGES uncommitted file(s)"
68+ fi
69+ else
70+ echo -e " ${GREEN} Changes:${NC} Working tree clean"
71+ fi
6572 else
66- echo -e " ${GREEN } Changes:${NC} Working tree clean "
73+ echo -e " ${YELLOW } Changes:${NC} (skipped - large repo) "
6774 fi
6875 echo " "
6976 fi
You can’t perform that action at this time.
0 commit comments