commit 649ed7804af6e3c15b8f785a3ae8985b61739f01
parent 3e29484ba9b4ebb67b5ddb7aee0af14a321209db
Author: Nihal Jere <nihal@nihaljere.xyz>
Date: Thu, 25 Nov 2021 22:18:20 -0600
check for null hash, newline on printf
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/git-submodule-integrate b/git-submodule-integrate
@@ -25,6 +25,7 @@ do
git -C "$child" diff-tree --root -t "$commit" | while read line
do
newhash=$(echo "$line" | cut -d' ' -f4)
+ [ "$newhash" = "0000000000000000000000000000000000000000" ] && continue
type=$(git -C "$child" cat-file -t "$newhash")
[ "$type" = "commit" ] && continue
@@ -37,5 +38,5 @@ do
git commit -C "$commit" || exit 1
finished=$(( finished + 1 ))
- printf "%s/%s finished" "$finished" "$total"
+ printf "%s/%s finished\n" "$finished" "$total"
done