#!/bin/bash

#qinrui

 

set -e

commitId=''

repoPath=''

x1=''

 

if [ -f changes15.txt ];then

        #git log |grep -A 2 9acd7d8537191caaf801a59428be5fbf0e110659| grep "Author"

 

        #for i in `cat changes15.txt|grep "changed from" | awk  -F "changed from" '{print $1}'`;do x1=$i;echo $x1;done

        #for i in `cat changes15.txt|grep "changed from" | awk  -F "changed from" '{print $1$6}'`;do echo $i;echo $;cd $i && cd - &&echo 'OK-ruiy';done

 

        #for j in `cat changes15.txt|grep "changed from" | awk  -F "to" '{print $2}'`;do echo $j;for i in `cat changes15.txt|grep "changed from" | awk  -F "changed from" '{print $1}'`;do echo $i;cd $i && cd -;done;done

 

 

 

        #for j in `cat changes15.txt|grep "changed from" | awk  -F "to" '{print $2}'`;do commitId=$j;echo $commitId;for i in `cat changes15.txt|grep "changed from" | awk  -F "changed from" '{print $1}'`;do cd $i ; git log |grep -A 2 $commitId ; cd - > /dev/null;done;done

 

 

 

        for j in `cat changes15.txt|grep "changed from" | awk  -F "to" '{print $2}'`;do commitId=$j;for i in `cat changes15.txt|grep "changed from" | awk  -F "changed from" '{print $1}'`;do repoPath=$i;cd $repoPath && git log | grep -A 2 $commitId && echo $repoPath ; cd - > /dev/null ;done;done

 

 

 

 

        #for i in `cat changes15.txt|grep "changed from" | awk  -F "changed from" '{print $1}'`;do echo $i;cd $i && cd -;done

        #echo "Ok"

else

        echo "no changes15.txt"

fi