chore: Refactor dotf script to display unpushed commit count
This commit is contained in:
parent
56132c53fc
commit
aacb9de41c
8
bin/dotf
8
bin/dotf
@ -18,13 +18,11 @@ logo() {
|
|||||||
printfe "%s" "green" "[$(git -C ~/dotfiles status --porcelain | grep -c '^M ')] staged "
|
printfe "%s" "green" "[$(git -C ~/dotfiles status --porcelain | grep -c '^M ')] staged "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printfe "%s" "blue" "[$(git -C ~/dotfiles rev-parse --short HEAD)]"
|
printfe "%s" "blue" "[$(git -C ~/dotfiles rev-parse --short HEAD)] "
|
||||||
println "" "normal"
|
|
||||||
|
|
||||||
# Check if we have commits to push
|
|
||||||
if [[ $(git -C ~/dotfiles log origin/master..HEAD) ]]; then
|
if [[ $(git -C ~/dotfiles log origin/master..HEAD) ]]; then
|
||||||
printfe "%s" "yellow" "[!] You have $(git -C ~/dotfiles log origin/master..HEAD --oneline | wc -l | tr -d ' ') commits to push"
|
printfe "%s" "yellow" "[!] You have $(git -C ~/dotfiles log origin/master..HEAD --oneline | wc -l | tr -d ' ') commit(s) to push"
|
||||||
fi
|
fi
|
||||||
|
println "" "normal"
|
||||||
|
|
||||||
if [[ $continue_eitherway == "continue" ]]; then
|
if [[ $continue_eitherway == "continue" ]]; then
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user