chore: Add check for unpushed commits in dotf script
This commit is contained in:
parent
a831fac2ac
commit
56132c53fc
5
bin/dotf
5
bin/dotf
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user