forked from mirrors/nixpkgs
rust: fix fetch-cargo-deps for git dependencies
We need to make sure that `$revs` ends with a space, since files must always end with newlines. The previous code ignored the last entry in `$revs`, because read already returns non-zero exit code for the last entry, as it does not end with a space.
This commit is contained in:
parent
3dc0792ec6
commit
19d3cf81d3
|
@ -148,7 +148,7 @@ EOF
|
|||
|
||||
cd "$out/git/checkouts/$name/$branch"
|
||||
rev="$(git rev-parse HEAD)"
|
||||
revs="$revs $rev"
|
||||
revs="$rev $revs"
|
||||
done < <(find . -type d -name .git -print)
|
||||
|
||||
echo "List of revs to keep for git db $name: $revs"
|
||||
|
@ -179,7 +179,7 @@ EOF
|
|||
done
|
||||
|
||||
# Create ad-hoc branches for the revs we need
|
||||
echo "$revs" | tr " " "\n" | while read -d " " rev; do
|
||||
echo "$revs" | while read -d " " rev; do
|
||||
echo "Creating git branch b_$rev $rev"
|
||||
git branch b_$rev $rev
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue