From 56132c53fc90c69475183d1c9987340e66a79b51 Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Thu, 22 Aug 2024 16:17:36 +0200 Subject: [PATCH] chore: Add check for unpushed commits in dotf script --- bin/dotf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/dotf b/bin/dotf index 84dc3e8..372909a 100755 --- a/bin/dotf +++ b/bin/dotf @@ -21,6 +21,11 @@ logo() { 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" + fi + if [[ $continue_eitherway == "continue" ]]; then return fi