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 be42d928a9d09d0138965a148cd378f22cf0ea1c
parent da6b1210056402f6fdf9729a34e8e82b1855a702
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Thu, 25 Nov 2021 17:53:45 -0600

do not add directories to index

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

diff --git a/git-submodule-integrate b/git-submodule-integrate @@ -15,7 +15,6 @@ do # copy the tree from the child to the parent treehash=$(git -C "$child" cat-file -p $commit | head -n1 | cut -f2 -d' ') - echo "treehash: $treehash" git -C "$child" cat-file tree "$treehash" | git hash-object -t tree -w --stdin > /dev/null @@ -28,7 +27,7 @@ do path=$(echo "$line" | cut -d' ' -f2) git -C "$child" cat-file "$type" "$hash" | git hash-object -t "$type" -w --stdin > /dev/null - git update-index --add --cacheinfo "$mode,$hash,$where/$path" > /dev/null + [ "$type" != "tree" ] && git update-index --add --cacheinfo "$mode,$hash,$where/$path" > /dev/null done git commit -C "$commit"