Skip to content

Commit 338fce6

Browse files
author
Vano
committed
prepare_commit_msg
1 parent d0ade98 commit 338fce6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

prepare-commit-msg

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
FILEPATH=$1
4+
5+
TYPE="None"
6+
[ "$2" != "" ] && TYPE=$2
7+
8+
HASH=""
9+
[ "$3" != "" ] && HASH=$3
10+
11+
HASH_MSG=""
12+
[ HASH != "" ] && HASH_MSG="Previous commit hash: ${HASH}"
13+
14+
cat <(printf "Commit type: %s\n%s\n" "$TYPE" "$HASH_MSG") $FILEPATH | tee 1>/dev/null $FILEPATH

0 commit comments

Comments
 (0)