Skip to content

Commit 73b25af

Browse files
committed
Update git-wrapper
1 parent e88e83a commit 73b25af

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.buildkite/scripts/run-agents/hooks/pre-checkout

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ ES_ORIGINAL_GIT_BINARY=$(which git)
66
export ES_ORIGINAL_GIT_BINARY
77

88
mkdir -p "$HOME/git-wrapper"
9-
cp "$DIR/../git" "$HOME/git-wrapper/"
9+
cat << 'EOF' > "$HOME/git-wrapper/git"
10+
#!/bin/bash
11+
12+
if [[ "${1:-}" == "submodule" || "${1:-}" == "clone" ]]; then exit 0; fi
13+
14+
"$ES_ORIGINAL_GIT_BINARY" "${@}"
15+
EOF
16+
1017
chmod +x "$HOME/git-wrapper/git"
1118

1219
export PATH="$HOME/git-wrapper:$PATH"

0 commit comments

Comments
 (0)