From e5ceec8621b081eea8bd061eab5c3fc3b0e784f6 Mon Sep 17 00:00:00 2001 From: Itamar Date: Thu, 10 Sep 2020 22:24:25 +0300 Subject: [PATCH] Ports: Add default .gitconfig for Git port This stops git from asking us to configure a username and email when we try to commit. --- Ports/.gitignore | 1 + Ports/git/.gitignore | 1 + Ports/git/default_gitconfig | 3 +++ Ports/git/package.sh | 5 +++++ 4 files changed, 10 insertions(+) create mode 100644 Ports/git/.gitignore create mode 100644 Ports/git/default_gitconfig diff --git a/Ports/.gitignore b/Ports/.gitignore index 8e999ab3021..4ed7fdd31a1 100644 --- a/Ports/.gitignore +++ b/Ports/.gitignore @@ -2,3 +2,4 @@ !*/package.sh !*/patches !*/patches/* +!*/.gitignore diff --git a/Ports/git/.gitignore b/Ports/git/.gitignore new file mode 100644 index 00000000000..7e563d93452 --- /dev/null +++ b/Ports/git/.gitignore @@ -0,0 +1 @@ +!default_gitconfig diff --git a/Ports/git/default_gitconfig b/Ports/git/default_gitconfig new file mode 100644 index 00000000000..2eeb9a6e337 --- /dev/null +++ b/Ports/git/default_gitconfig @@ -0,0 +1,3 @@ +[user] + email = anon + name = anon diff --git a/Ports/git/package.sh b/Ports/git/package.sh index 2a98e4eb41b..82bcc68b1bf 100755 --- a/Ports/git/package.sh +++ b/Ports/git/package.sh @@ -11,6 +11,11 @@ build() { run make strip } +post_install() { + mkdir -p "$SERENITY_ROOT"/Build/Root/home/anon + cp "$workdir"/../default_gitconfig "$SERENITY_ROOT"/Build/Root/home/anon/.gitconfig +} + export NO_OPENSSL=1 export ac_cv_fread_reads_directories=no export ac_cv_snprintf_returns_bogus=no