如题所述,用到的命令其实很简单,关键的就这一句

git log --stat --author=pattern
在这一句命令的基础上,我写了一个脚本用于抓取一个list中所有人的提交log,以及每次提交的文件

#!/bin/bash#the script could catch the changelog list of openplatform kernel and android#use this script,you should modify the three information of yours #1.HOME_NAME#2.Add the author into the authors list#3.set the root path of the projectHOME_NAME=xh.huang#set the author list in order to match which committing is from ourselvesauthors=(aaaaaa@google.com.cnbbbbbb@google.com.cncccccc@google.com.cn)#init the path which project you should catching the log listPATH_KERNEL="/home/$HOME_NAME/kernel"PATH_ANDROID="/home/$HOME_NAME/jb-4.2"#init the result file of change log list which to saveRESULT_DIR="/home/$HOME_NAME/changeloglist"RESULT_KERNEL="kernel.changelog"RESULT_ANDROID="android.changelog"RESULT_PROJECT=(kernel.changelog android.changelog)#build the store where to save the resultmkdir $RESULT_DIRcd $RESULT_DIRfor result in ${RESULT_PROJECT[*]}{rm -rf $resulttouch $result}#catch the changeloglist of kernelPATH_RESULT_KERNEl=$RESULT_DIR"/"$RESULT_KERNELecho "*************************************************************************" >> $PATH_RESULT_KERNElecho "The project of " $RESULT_KERNEL "changeloglist" >> $PATH_RESULT_KERNElecho "*************************************************************************" >> $PATH_RESULT_KERNElcd $PATH_KERNELfor author in ${authors[*]}{    git log --stat --author=$author >> $PATH_RESULT_KERNEl} #catch the changeloglist of androidPATH_RESULT_ANDROID=$RESULT_DIR"/"$RESULT_ANDROIDecho "*************************************************************************" >> $PATH_RESULT_ANDROIDecho "The project of " $RESULT_ANDROID "changeloglist" >> $PATH_RESULT_ANDROIDecho "*************************************************************************" >> $PATH_RESULT_ANDROIDcd $PATH_ANDROIDfor author in ${authors[*]}{    repo forall -c git log --stat --author=$author >> $PATH_RESULT_ANDROID} 
上面的脚本可以拿来直接用,你可以根据需要进行修改,其中repo forall是对Android中的每个project执行后面的git命令

更多相关文章

  1. 编译cubieboard android 源码过程详解之(五):make
  2. Android(安卓)Repo
  3. 新版Cordova(>4.0)编译Android(安卓)APK打上签名方法
  4. AndroidJNI实践(1)-使用.h头文件-静态注册JNI方法
  5. Android使用glide实现毛玻璃效果
  6. Android官方命令深入分析之dmtracedump
  7. 探索Android(安卓)FrameWork底层开发
  8. Android的Multilib Build
  9. Android命令行用已有的keystore对apk进行签名

随机推荐

  1. 关于Android中Context的操作
  2. 申请 android google map API key
  3. Android之SQlite
  4. Android(安卓)模拟器串口与PC虚拟串口通
  5. Andriod 笔记04
  6. 关于android 图像格式问题
  7. 错误信息:Error generating final archive
  8. android中实现tab标签切换时的一些效果
  9. EditText的属性说明
  10. Android(安卓)存储(本地存储 SD卡存储 Sha