commit b92ceed6ce8fd41ce346ffcc2c832bd2fb46d8ba
parent 3693a4f459ef6844caaa09bfb20da0eebb0f3585
Author: Nihal Jere <nihal@nihaljere.xyz>
Date: Thu, 25 Nov 2021 20:43:09 -0600
add progress
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/git-submodule-integrate b/git-submodule-integrate
@@ -8,6 +8,9 @@
child="$1"
where="$2"
+total=$(git -C "$child" rev-list --count HEAD)
+finished=0
+
for commit in $(git -C "$child" rev-list --reverse HEAD)
do
# copy the commit from the child to the parent
@@ -34,4 +37,7 @@ do
git restore .
git commit -C "$commit" || exit 1
+
+ finished=$(( finished + 1 ))
+ printf "%s/%s finished" "$finished" "$total"
done