summaryrefslogtreecommitdiffstats
path: root/etc/examples/140-within-line-edits
blob: d25955185541ab89562c48178461b61fa8e8888d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash


repo=$(mktemp -d)
cd $repo

git init
git commit --allow-empty -m "Initial commit"

echo "did_emsg = FALSE;" > file.R

git add file.R
git commit -m "Base commit"

echo "did_emsg == FALSE;" > file.R

git add file.R
git commit -m "Short change"

git revert --no-edit HEAD

echo "did_emsg = TRUE;" > file.R
git add file.R
git commit -m "Long change"

git log --patch