#!/bin/sh # SPDX-License-Identifier: MIT set -eu export TZ=UTC LC_ALL=C export GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_GLOBAL=/dev/null export GIT_AUTHOR_NAME='Example Author' GIT_AUTHOR_EMAIL='author@example.invalid' export GIT_COMMITTER_NAME='Example Author' GIT_COMMITTER_EMAIL='author@example.invalid' export GIT_AUTHOR_DATE='2026-10-27T12:00:00+00:00' export GIT_COMMITTER_DATE='2026-10-27T12:00:00+00:00' test "$(git --version)" = 'git version 2.56.0' mkdir example-work cd example-work git init --bare -q --template= --initial-branch=main remote.git git init -q --template= --initial-branch=main project cd project git config commit.gpgsign false git config core.autocrlf false git remote add origin ../remote.git printf 'first\n' > note.txt git add note.txt git commit -qm 'Create note' git push -q -u origin main printf 'second\n' >> note.txt git add note.txt git commit -qm 'Add detail' git mv note.txt notes-renamed.txt git commit -qm 'Rename note' printf 'History with --follow:\n' git log --follow --format='%s' -- notes-renamed.txt test "$(git log --follow --format='%s' -- notes-renamed.txt | wc -l | tr -d ' ')" = 3