Skip to content

Commit a6e9e32

Browse files
committed
Add failing test
1 parent 02083c0 commit a6e9e32

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

gix-blame/tests/blame.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ mktest!(
242242
"different-file-in-another-chain-of-ancestors",
243243
1
244244
);
245+
mktest!(file_only_changed_in_branch, "file-only-changed-in-branch", 2);
245246

246247
#[test]
247248
#[ignore = "TBD: figure out what the problem is"]

gix-blame/tests/fixtures/make_blame_repo.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,19 @@ git commit -q -m c11
168168
git checkout main
169169
git merge different-branch-that-does-not-contain-file || true
170170

171+
echo -e "line 1\nline 2\n line 3" > file-only-changed-in-branch.txt
172+
git add file-only-changed-in-branch.txt
173+
git commit -q -m c12
174+
175+
git checkout -b branch-that-has-one-commit
176+
177+
echo -e "line 1 changed\nline 2\n line 3" > file-only-changed-in-branch.txt
178+
git add file-only-changed-in-branch.txt
179+
git commit -q -m c13
180+
181+
git checkout main
182+
git merge branch-that-has-one-commit || true
183+
171184
git blame --porcelain simple.txt > .git/simple.baseline
172185
git blame --porcelain multiline-hunks.txt > .git/multiline-hunks.baseline
173186
git blame --porcelain deleted-lines.txt > .git/deleted-lines.baseline
@@ -184,6 +197,7 @@ git blame --porcelain coalesce-adjacent-hunks.txt > .git/coalesce-adjacent-hunks
184197
git blame --porcelain resolved-conflict.txt > .git/resolved-conflict.baseline
185198
git blame --porcelain file-in-one-chain-of-ancestors.txt > .git/file-in-one-chain-of-ancestors.baseline
186199
git blame --porcelain different-file-in-another-chain-of-ancestors.txt > .git/different-file-in-another-chain-of-ancestors.baseline
200+
git blame --porcelain file-only-changed-in-branch.txt > .git/file-only-changed-in-branch.baseline
187201

188202
git blame --porcelain empty-lines-histogram.txt > .git/empty-lines-histogram.baseline
189203

0 commit comments

Comments
 (0)