X-Git-Url: https://git.phdru.name/?p=git-scripts.git;a=blobdiff_plain;f=submodules%2Fdiff-name-only;h=3736e8eaa926684662285496b3fd2ea7f5e74f4c;hp=2209563f725ee62693257002f8642a77254d115d;hb=bfb656fdb66ed2525970518507e758c6413eb5b9;hpb=05a269340e7584e2a963c07907ce706bdcb8ee53 diff --git a/submodules/diff-name-only b/submodules/diff-name-only index 2209563..3736e8e 100755 --- a/submodules/diff-name-only +++ b/submodules/diff-name-only @@ -11,11 +11,11 @@ to_commit="${2:-HEAD}" export from_commit to_commit # In the superproject -git --no-pager diff --name-only "$from_commit" "$to_commit" +{ git --no-pager diff --name-only "$from_commit" "$to_commit" git submodule foreach ' # In submodule "$name" prev_commit=`(git -C "$toplevel" ls-tree "$from_commit" "$sm_path" | awk "{print \\$3}")` curr_commit=`(git -C "$toplevel" ls-tree "$to_commit" "$sm_path" | awk "{print \\$3}")` git --no-pager diff --name-only $prev_commit $curr_commit -' +'; } | { test -t 1 && ${PAGER:-less} || cat -; }