handle local repositories
This commit is contained in:
parent
bb405a4935
commit
ae878ea120
1 changed files with 7 additions and 3 deletions
10
gis
10
gis
|
|
@ -80,12 +80,16 @@ for dir in $git_dirs; do
|
||||||
# Get repository name
|
# Get repository name
|
||||||
repository_name=$(basename "$dir")
|
repository_name=$(basename "$dir")
|
||||||
|
|
||||||
# Get origin head
|
|
||||||
[[ $(git symbolic-ref refs/remotes/origin/HEAD) =~ \/([^\/]*)$ ]] &>/dev/null && origin_head="${BASH_REMATCH[1]}"
|
|
||||||
|
|
||||||
# Get current branch
|
# Get current branch
|
||||||
current_branch=$(git branch --show-current)
|
current_branch=$(git branch --show-current)
|
||||||
|
|
||||||
|
# Get origin head
|
||||||
|
if git symbolic-ref refs/remotes/origin/HEAD > /dev/null 2>&1; then
|
||||||
|
[[ $(git symbolic-ref refs/remotes/origin/HEAD) =~ \/([^\/]*)$ ]] &>/dev/null && origin_head="${BASH_REMATCH[1]}"
|
||||||
|
else
|
||||||
|
origin_head="$current_branch"
|
||||||
|
fi
|
||||||
|
|
||||||
status_keys=""
|
status_keys=""
|
||||||
|
|
||||||
# Check stash
|
# Check stash
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue