flutter: Remove existing .git directories

This commit is contained in:
hacker1024 2023-10-23 22:32:54 +11:00 committed by Maciej Krüger
parent 456779edc2
commit 27f61f5e1b
No known key found for this signature in database
GPG key ID: 0D948CE19CF49C5F

View file

@ -47,14 +47,13 @@ let
# The flutter_tools package tries to run many Git commands. In most
# cases, unexpected output is handled gracefully, but commands are never
# expected to fail completely. A blank repository needs to be created.
if [ ! -d .git ]; then
git init -b nixpkgs
GIT_AUTHOR_NAME=Nixpkgs GIT_COMMITTER_NAME=Nixpkgs \
GIT_AUTHOR_EMAIL= GIT_COMMITTER_EMAIL= \
GIT_AUTHOR_DATE='1/1/1970 00:00:00 +0000' GIT_COMMITTER_DATE='1/1/1970 00:00:00 +0000' \
git commit --allow-empty -m "Initial commit"
(. '${../../../build-support/fetchgit/deterministic-git}'; make_deterministic_repo .)
fi
rm -rf .git # Remove any existing Git directory
git init -b nixpkgs
GIT_AUTHOR_NAME=Nixpkgs GIT_COMMITTER_NAME=Nixpkgs \
GIT_AUTHOR_EMAIL= GIT_COMMITTER_EMAIL= \
GIT_AUTHOR_DATE='1/1/1970 00:00:00 +0000' GIT_COMMITTER_DATE='1/1/1970 00:00:00 +0000' \
git commit --allow-empty -m "Initial commit"
(. '${../../../build-support/fetchgit/deterministic-git}'; make_deterministic_repo .)
mkdir -p bin/cache