giti adaption for branches != master / main
This commit is contained in:
parent
f744338ad0
commit
ec06a305f6
11
giti
11
giti
@ -1,9 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
|
||||
# TODO: color change, if brach(dark magenta) or fix version (dark cyan) instead of green
|
||||
|
||||
|
||||
# DEFINITIONS #####################################################################################
|
||||
COLOR_WHITE="\033[00m"
|
||||
COLOR_CYAN="\033[1;36m"
|
||||
@ -104,6 +101,14 @@ if [[ $COMMITED_VAL > 0 || $CHANGED_VAL > 0 || $NEW_VAL > 0 ]]; then
|
||||
COLOR_BRANCH="$COLOR_WHITE"
|
||||
elif [[ $BEHIND_VAL > 0 || $AHEAD_VAL > 0 ]]; then
|
||||
COLOR_BRANCH="$COLOR_DARKGREEN"
|
||||
elif [[ $BRANCH_VAL != "master" && $BRANCH_VAL != "main" ]]; then
|
||||
if [[ $BRANCH_VAL == *"HEAD detached at"* ]]; then
|
||||
COLOR_BRANCH=$COLOR_OCHRE
|
||||
BRANCH_VAL=$(echo $BRANCH_VAL | awk '{print $4}')
|
||||
BRANCH_VAL=${BRANCH_VAL::-1}
|
||||
else
|
||||
COLOR_BRANCH=$COLOR_BLUE
|
||||
fi
|
||||
fi
|
||||
|
||||
# GIT GATHERING ###################################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user