自学内容网 自学内容网

lineageos-19 仓库群遍历,打印第一条git log

lineageos-19 仓库群遍历,打印第一条git log

RepoLsRootD=/app4/lineage19_oneplus6
LogF=/app4/wiki/repo_head_log_ls-lineageos19.1.log
rm -v $LogF && \
cd $RepoLsRootD && \
find . -type l -path "*/*.git" -not -path "./.repo/*" | \
while read -r k ; do \
  ( echo -n  "'$k' linkTo '$(readlink -f $k)' " && \
  d=$(dirname $k) && \
  cd $d && \
  echo ", pwd='$(pwd)' "  && \
  git --no-pager  log --decorate  --oneline     -1 && \
  echo -e "\n"  ;)    ; \
done 2>&1 | \
tee $LogF

--decorate 确保 git在 pipe下依然显示完整, 相关详细参数为git log --format

find . -type l 仓库的git-dir 实际链接到了 $RootDir/.repo/xxx

repoD=$(dirname $gitDirSoftLinkJ) == gitDirSoftLinkJ的父亲目录 为 repoD

输出如下

'./android/.git' linkTo '/app4/lineage19_oneplus6/.repo/projects/android.git' , pwd='/app4/lineage19_oneplus6/android' 
d1466a5 (HEAD, m/lineage-19.1, github/lineage-19.1) Track our own forks for 2024-06 ASB patching


'./art/.git' linkTo '/app4/lineage19_oneplus6/.repo/projects/art.git' , pwd='/app4/lineage19_oneplus6/art' 
f192ca3 (HEAD, tag: android-12.1.0_r22, tag: m/lineage-19.1) Allow PROT_EXEC on the zygote mappings when falling back to ashmem am: 94e2fc9465 am: a09c5cf5e4


'./bionic/.git' linkTo '/app4/lineage19_oneplus6/.repo/projects/bionic.git' , pwd='/app4/lineage19_oneplus6/bionic' 
6e6ed4d6c (HEAD, m/lineage-19.1, github/lineage-19.1) Add ability to build scudo-free 32-bit libc variant.


'./bootable/libbootloader/.git' linkTo '/app4/lineage19_oneplus6/.repo/projects/bootable/libbootloader.git' , pwd='/app4/lineage19_oneplus6/bootable/libbootloader' 
b44eeef (HEAD, tag: android-12.1.0_r22, tag: m/lineage-19.1) Add libxbc for bootloader bootconfig support am: db746bf101 am: 2174268797 am: 94022972b4

...

原文地址:https://blog.csdn.net/hfcaoguilin/article/details/143665992

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!