Merge pull request #8 from ConstantConstantin/update/renamed

add symbol for renamed files
This commit is contained in:
Denis Lehmann 2024-08-08 13:49:24 +00:00 committed by GitHub
commit 3d1adc0c12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -66,6 +66,7 @@ It was inspired by [[https://wiki.ros.org/wstool][wstool]], [[https://github.com
! - Local changes
+ - Staged changes
- - File removed
» - File renamed
= - Both modified
⇕ - Diverged from upstream
⇡ - Ahead upstream
@ -84,6 +85,6 @@ It was inspired by [[https://wiki.ros.org/wstool][wstool]], [[https://github.com
: git remote set-head origin -a
Or set it manually to any branch with:
: git remote set-head origin <branch_name>
: git remote set-head origin <branch_name>
The number of additional local branches which are neither checked out, nor the =origin/HEAD= branch, is appended at the end of the branch output, e.g. =(+8)=.

2
gis
View file

@ -219,6 +219,7 @@ for dir in "${git_dirs[@]}"; do
status_keys="${status_keys//D/-}"
status_keys="${status_keys//M/!}"
status_keys="${status_keys//U/=}"
status_keys="${status_keys//R/»}"
# Update all status keys
all_status_keys="${all_status_keys}${status_keys}"
@ -261,6 +262,7 @@ if [[ "$all_status_keys" ]]; then
[[ "$all_status_keys" == *"!"* ]] && echo " ${text_bold}${text_red}!${text_reset} - Local changes"
[[ "$all_status_keys" == *"+"* ]] && echo " ${text_bold}${text_red}+${text_reset} - Staged changes"
[[ "$all_status_keys" == *"-"* ]] && echo " ${text_bold}${text_red}-${text_reset} - File removed"
[[ "$all_status_keys" == *"»"* ]] && echo " ${text_bold}${text_red}»${text_reset} - File renamed"
[[ "$all_status_keys" == *"="* ]] && echo " ${text_bold}${text_red}=${text_reset} - Both modified"
[[ "$all_status_keys" == *"⇕"* ]] && echo " ${text_bold}${text_red}⇕${text_reset} - Diverged from upstream"
[[ "$all_status_keys" == *"⇡"* ]] && echo " ${text_bold}${text_red}⇡${text_reset} - Ahead upstream"