File tree Expand file tree Collapse file tree 1 file changed +70
-0
lines changed Expand file tree Collapse file tree 1 file changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -eu -o pipefail
3+
4+ function tick () {
5+ if test -z " ${tick+set} "
6+ then
7+ tick=1112911993
8+ else
9+ tick=$(( $tick + 60 ))
10+ fi
11+ GIT_COMMITTER_DATE=" $tick -0700"
12+ GIT_AUTHOR_DATE=" $tick -0700"
13+ export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
14+ }
15+
16+ function write_lines () {
17+ printf " %s\n" " $@ "
18+ }
19+
20+ git init simple
21+ (cd simple
22+ rm -Rf .git/hooks
23+ write_lines 1 2 3 4 5 > numbers
24+ echo hello > greeting
25+ echo foo > whatever
26+ git add numbers greeting whatever
27+ tick
28+ git commit -m initial
29+
30+ git branch side1
31+ git branch side2
32+ git branch side3
33+ git branch side4
34+
35+ git checkout side1
36+ write_lines 1 2 3 4 5 6 > numbers
37+ echo hi > greeting
38+ echo bar > whatever
39+ git add numbers greeting whatever
40+ tick
41+ git commit -m modify-stuff
42+
43+ git checkout side2
44+ write_lines 0 1 2 3 4 5 > numbers
45+ echo yo > greeting
46+ git rm whatever
47+ mkdir whatever
48+ > whatever/empty
49+ git add numbers greeting whatever/empty
50+ tick
51+ git commit -m other-modifications
52+
53+ git checkout side3
54+ git mv numbers sequence
55+ tick
56+ git commit -m rename-numbers
57+
58+ git checkout side4
59+ write_lines 0 1 2 3 4 5 > numbers
60+ echo yo > greeting
61+ git add numbers greeting
62+ tick
63+ git commit -m other-content-modifications
64+
65+ git switch --orphan unrelated
66+ > something-else
67+ git add something-else
68+ tick
69+ git commit -m first-commit
70+ )
You can’t perform that action at this time.
0 commit comments