chore: Refactor dotf script to display unpushed commit count
This commit is contained in:
6
bin/dotf
6
bin/dotf
@@ -19,12 +19,10 @@ logo() {
|
||||
fi
|
||||
|
||||
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
|
||||
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
|
||||
println "" "normal"
|
||||
|
||||
if [[ $continue_eitherway == "continue" ]]; then
|
||||
return
|
||||
|
Reference in New Issue
Block a user