summaryrefslogtreecommitdiff
path: root/.github/workflows/setup_git.sh
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2020-07-28 18:04:52 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2020-08-13 00:33:31 -0700
commitecbfa5e44853fbd07028bd5f98e3b0f2d783f0ed (patch)
treec95e3b3581e124c1263229671d6ad82864b3d5a3 /.github/workflows/setup_git.sh
parentc00773521eb4c779185ba34019bd9239cc3fd73a (diff)
downloadspack-ecbfa5e44853fbd07028bd5f98e3b0f2d783f0ed.tar.gz
spack-ecbfa5e44853fbd07028bd5f98e3b0f2d783f0ed.tar.bz2
spack-ecbfa5e44853fbd07028bd5f98e3b0f2d783f0ed.tar.xz
spack-ecbfa5e44853fbd07028bd5f98e3b0f2d783f0ed.zip
Use "fetch-depth: 0" to retrieve all history from remote
Diffstat (limited to '.github/workflows/setup_git.sh')
-rwxr-xr-x.github/workflows/setup_git.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/.github/workflows/setup_git.sh b/.github/workflows/setup_git.sh
new file mode 100755
index 0000000000..bd79daf268
--- /dev/null
+++ b/.github/workflows/setup_git.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env sh
+git config --global user.email "spack@example.com"
+git config --global user.name "Test User"
+# With fetch-depth: 0 we have a remote develop
+# but not a local branch. Don't do this on develop
+if [ "$(git branch --show-current)" != "develop" ]
+then
+ git branch develop origin/develop
+fi