chore: Refactor dotf script to display unpushed commit count
This commit is contained in:
parent
56132c53fc
commit
aacb9de41c
6
bin/dotf
6
bin/dotf
@ -19,12 +19,10 @@ logo() {
|
|||||||
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