chore: Add check for unpushed commits in dotf script

This commit is contained in:
Menno van Leeuwen 2024-08-22 16:17:36 +02:00
parent a831fac2ac
commit 56132c53fc

View File

@ -21,6 +21,11 @@ logo() {
printfe "%s" "blue" "[$(git -C ~/dotfiles rev-parse --short HEAD)]" printfe "%s" "blue" "[$(git -C ~/dotfiles rev-parse --short HEAD)]"
println "" "normal" 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"
fi
if [[ $continue_eitherway == "continue" ]]; then if [[ $continue_eitherway == "continue" ]]; then
return return
fi fi