Skip to content

Commit

Permalink
Store exact submodule commit for --treeish
Browse files Browse the repository at this point in the history
  • Loading branch information
KSR-Yasuda committed Feb 7, 2024
1 parent fc86194 commit f44d5d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-archive-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ fi
if [ $VERBOSE -eq 1 ]; then
echo -n "archiving submodules..."
fi
git submodule >>"$TMPLIST"
git submodule status | awk -v 'ORS=\0' '{ print $2 }' | xargs -0 -I{} git ls-tree "$TREEISH" {} | awk '{ "git -C ''" $4 "'' name-rev --name-only ''" $3 "''" | getline ref; print " " $3 , $4 , "(" ref ")"}' >> "$TMPLIST"
while read path; do
TREEISH=$(grep "^ .*${path%/} " "$TMPLIST" | cut -d ' ' -f 2) # git submodule does not list trailing slashes in $path
cd "$path"
Expand Down

0 comments on commit f44d5d0

Please sign in to comment.