blame
parent
d683bd1bbe
commit
86755c4942
|
|
@ -8,14 +8,14 @@ fi
|
|||
|
||||
text="$1"
|
||||
echo "blame start $text"
|
||||
if [[ $text =~ (ProjectNLD\/[^:]+)\/([^:]+\.cs):([0-9]+) ]]; then
|
||||
if [[ $text =~ (Assets\/[^:\(]+)\/([^:\(]+\.cs)[:\(]([0-9]+) ]]; then
|
||||
path="${BASH_REMATCH[1]}"
|
||||
fileName="${BASH_REMATCH[2]}"
|
||||
line_number="${BASH_REMATCH[3]}"
|
||||
echo "blame path:$path"
|
||||
echo "blame file: $fileName"
|
||||
echo "blame line_num: $line_number"
|
||||
cd ../../"$path" || exit
|
||||
cd ../../ProjectNLD/"$path" || exit
|
||||
last_commit_author=$(git blame -L "$line_number" "$fileName" | awk '{print $2; exit}')
|
||||
message="author:${last_commit_author:1}"
|
||||
echo "message:$message"
|
||||
|
|
|
|||
Loading…
Reference in New Issue