Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-02-25 14:43:18 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-02-25 15:04:58 +0300
commit94fd94a29129c2deb72e7b4ca2c18e51a1257c73 (patch)
tree097d13caaa7e9e3246cc646d3169f5594c4ddf51
parentbcd7a5ee38f86ab0c31c9d515d367227eee785cc (diff)
Makefile: don't conditionally call "git init"
Change a conditional invocation of "git init" in 85e95d6c7 (Makefile: Fix rebuilds of git/libgit2 when given a ref, 2021-02-24) to just always (re-)init the repository. There's no harm in doing so, and this way we'd e.g. catch some case with something seriously being wrong earlier, would re-set any future defaults/templating in newer versions of git, fix up issues if we killed/ctrl+c'd the git/make process at just the wrong time etc.
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index bacd7537a..58b42eb7f 100644
--- a/Makefile
+++ b/Makefile
@@ -410,7 +410,7 @@ ${DEPENDENCY_DIR}/git.version: dependency-version | ${DEPENDENCY_DIR}
${Q}[ x"$$(cat "$@" 2>/dev/null)" = x"${GIT_VERSION}" ] || >$@ echo -n "${GIT_VERSION}"
${LIBGIT2_INSTALL_DIR}/lib/libgit2.a: ${DEPENDENCY_DIR}/libgit2.version
- ${Q}[ -d "${LIBGIT2_SOURCE_DIR}" ] || ${GIT} init --initial-branch=master ${GIT_QUIET} ${LIBGIT2_SOURCE_DIR}
+ ${Q}${GIT} init --initial-branch=master ${GIT_QUIET} ${LIBGIT2_SOURCE_DIR}
${Q}${GIT} -C "${LIBGIT2_SOURCE_DIR}" fetch --depth 1 ${GIT_QUIET} ${LIBGIT2_REPO_URL} ${LIBGIT2_VERSION}
${Q}${GIT} -C "${LIBGIT2_SOURCE_DIR}" switch ${GIT_QUIET} --detach FETCH_HEAD
${Q}rm -rf ${LIBGIT2_BUILD_DIR}
@@ -421,7 +421,7 @@ ${LIBGIT2_INSTALL_DIR}/lib/libgit2.a: ${DEPENDENCY_DIR}/libgit2.version
ifeq (${GIT_USE_PREBUILT_BINARIES},)
${GIT_INSTALL_DIR}/bin/git: ${DEPENDENCY_DIR}/git.version
- ${Q}[ -d "${GIT_SOURCE_DIR}" ] || ${GIT} init --initial-branch=master ${GIT_QUIET} ${GIT_SOURCE_DIR}
+ ${Q}${GIT} init --initial-branch=master ${GIT_QUIET} ${GIT_SOURCE_DIR}
${Q}${GIT} -C "${GIT_SOURCE_DIR}" fetch --depth 1 ${GIT_QUIET} ${GIT_REPO_URL} ${GIT_VERSION}
${Q}${GIT} -C "${GIT_SOURCE_DIR}" switch ${GIT_QUIET} --detach FETCH_HEAD
${Q}rm -rf ${GIT_INSTALL_DIR}