show amount of W-I-P commits
This commit is contained in:
parent
f461e4ac4d
commit
af5e9a5850
|
@ -1,11 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
wips=$(git log --oneline --no-decorate | grep -i wip )
|
||||
wips_n=$(echo "$wips" | wc -l)
|
||||
|
||||
if [[ -n "$wips" ]]; then
|
||||
# Allows us to read user input below, assigns stdin to keyboard
|
||||
exec < /dev/tty
|
||||
echo "contains WIP commit"
|
||||
echo "contains $wips_n WIP commit(s)"
|
||||
read -p "Really push? (Y/N)" -n 1 -r
|
||||
case "$REPLY" in
|
||||
y|Y ) echo "continuing...";;
|
||||
|
|
Loading…
Reference in New Issue