git-submodule-integrate

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/git-submodule-integrate
Log | Files | Refs | README | LICENSE

commit 733d11721e1566c6b5a087975badc68fad40fdd9
parent 53e8269dab102260d43559be2327dbe7160cc473
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Fri, 26 Nov 2021 12:09:15 -0600

handle merge commits properly

Diffstat:
Mgit-submodule-integrate | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-submodule-integrate b/git-submodule-integrate @@ -22,7 +22,7 @@ do git -C "$child" cat-file tree "$treehash" | git hash-object -t tree -w --stdin > /dev/null # copy the files and subtrees into the parent - git -C "$child" diff-tree --root -t "$commit" | while read line + git -C "$child" diff-tree -m --root -t "$commit" | while read line do newhash=$(echo "$line" | cut -d' ' -f4) [ "$newhash" = "0000000000000000000000000000000000000000" ] && continue @@ -35,7 +35,7 @@ do git rm -q -r --cached "$where" git read-tree --prefix="$where" "$treehash" - git commit -C "$commit" + git commit --allow-empty -C "$commit" finished=$(( finished + 1 )) printf "%s/%s finished\n" "$finished" "$total"