2 # See the discussion at https://stackoverflow.com/q/67724347/7976758
5 echo "Usage $0 from_commit [to_commit]"
10 to_commit="${2:-HEAD}"
13 git --no-pager diff --name-only "$from_commit" "$to_commit"
15 git submodule foreach "
16 # In submodule \"\$name\"
17 prev_commit=\`(git -C \"\$toplevel\" ls-tree "$from_commit" \"\$sm_path\" | awk '{print \$3}')\`
18 curr_commit=\`(git -C \"\$toplevel\" ls-tree "$to_commit" \"\$sm_path\" | awk '{print \$3}')\`
19 git --no-pager diff --name-only \$prev_commit \$curr_commit