]> git.ipfire.org Git - thirdparty/systemd.git/blame - tools/git-setup.sh
Merge pull request #32204 from DaanDeMeyer/post-rewrite
[thirdparty/systemd.git] / tools / git-setup.sh
CommitLineData
7629744a 1#!/bin/sh
9ee03516 2# SPDX-License-Identifier: LGPL-2.1-or-later
7629744a 3set -eu
003c8879 4
3b6fd3c1 5cd "${MESON_SOURCE_ROOT:?}"
003c8879 6
6233a769
DDM
7if [ -e .git ]; then
8 git config submodule.recurse true
9 git config fetch.recurseSubmodules on-demand
e33d43b0 10 git config push.recurseSubmodules no
6233a769
DDM
11fi
12
f1e9e804
DDM
13ret=2
14
15if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
16 cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit
17 chmod +x .git/hooks/pre-commit
18 echo 'Activated pre-commit hook'
19 ret=0
20fi
21
22if [ ! -f .git/hooks/post-rewrite ]; then
23 cp -p tools/git-post-rewrite-hook.sh .git/hooks/post-rewrite
24 echo 'Activated post-rewrite hook'
25 ret=0
003c8879
ZJS
26fi
27
f1e9e804 28exit $ret