Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

Name a deleted file once in its diff header

e411131b7f3d8b9f2045bcd24a6ec281e7058bcc · Keenan Nemetz · 8d ago · parent bef0c093

Name a deleted file once in its diff header

The header prefixes the old path and an arrow only for a file that moved, but the
test for "moved" was "an old path and a different new one", which is also true of
a deletion with no new path at all: the pane read "gone.txt → gone.txt". Require
both sides before calling it a rename.

server/commit_test.go +4

@@ -162,6 +162,10 @@ func TestCommitPageShowsADeletedFile(t *testing.T) {
162 162 if !strings.Contains(page, `data-highlight-side="old">first line<`) {
163 163 t.Fatalf("the deleted file has no patch:\n%.2000s", page)
164 164 }
165 // A deletion is not a rename: the header names the file once, not "x → x".
166 if !strings.Contains(page, `<span class="path">gone.txt</span>`) {
167 t.Fatalf("the deleted file's header does not name it once:\n%.2000s", page)
168 }
165 169 }
166 170
167 171 // TestCommitPageShowsTheWholeOfOneFilesPatch: the page renders one file's patch,