Fix error message on 'get commit' when there are no previous commits to show a log message from.
This commit is contained in:
parent
7298da2cc4
commit
5bbac7755a
1 changed files with 1 additions and 1 deletions
2
bin/get
2
bin/get
|
|
@ -115,7 +115,7 @@ fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'!' | commit)
|
'!' | commit)
|
||||||
echo "Parent commit: $(git log --abbrev-commit -1 --pretty=format:'%C(bold blue)%s%Creset %Cgreen(%cr)%Creset')"
|
parent_commit="$(git log --abbrev-commit -1 --pretty=format:'%C(bold blue)%s%Creset %Cgreen(%cr)%Creset' 2>/dev/null)" && echo "Parent commit: $parent_commit"
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
read -ep 'Message: ' msg
|
read -ep 'Message: ' msg
|
||||||
git commit -m "$msg"
|
git commit -m "$msg"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue