Search code examples
gitandroid-buildrepoforall

GIT - Multiple repos - List all touched/dirty files (example Android build system)


In a typical multiple repo scenario like Android build system (where kernel is a git repo, framework/base is a different git repo, bootable/bootlaoder/lk etc..) it becomes difficult to track all the changed files in all the repos.

A practical issue is say if most of your changes are spread across 1 or 2 major components (like kernel and framwork/base) you might miss to commit a minor change in a different repo.

Question is: Is there a single command that I can fire from the root folder that does the job
Pls note if possible I would try to avoid installing new software/packages - any working solution with repo /git would be greatly appreciated


Solution

  • Found a solution using repo forall :-

    zhossain@zhossain-linux:/local/mnt/workspace/LE.UM.0.0_2_13$ repo forall -pc "git diff --name-only"
    
    project bootable/bootloader/lk/
    target/msm8909/init.c
    
    project frameworks/
    av/media/mtp/MtpMain.cpp
    
    project kernel/msm-3.18/
    arch/arm/boot/dts/qcom/apq8017-no-pmi-wcd-rome-cdp.dts
    arch/arm/boot/dts/qcom/msm8917-pinctrl.dtsi
    arch/arm64/configs/msm8937_defconfig
    zhossain@zhossain-linux:/local/mnt/workspace/LE.UM.0.0_2_13$