Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/diffs/src/utils/parsePatchFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export function processFile(
// We have to handle these for pure renames because there won't be
// --- and +++ lines
if (line.startsWith('rename from ')) {
currentFile.prevName = line.replace('rename from ', '');
currentFile.prevName = line.replace('rename from ', '').trim();
}
if (line.startsWith('rename to ')) {
currentFile.name = line.replace('rename to ', '').trim();
Expand Down
20 changes: 4 additions & 16 deletions packages/diffs/test/__snapshots__/parsePatchFiles.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1206,10 +1206,7 @@ exports[`parsePatchFiles should parse diff.patch and match snapshot: git pr patc
"hunks": [],
"isPartial": true,
"name": "packages/diffs/src/components/web-components.ts",
"prevName":
"packages/diffs/src/custom-components/Container.ts
"
,
"prevName": "packages/diffs/src/custom-components/Container.ts",
"splitLineCount": 0,
"type": "rename-pure",
"unifiedLineCount": 0,
Expand Down Expand Up @@ -1932,10 +1929,7 @@ exports[`parsePatchFiles should parse diff.patch and match snapshot: git pr patc
"hunks": [],
"isPartial": true,
"name": "packages/diffs/src/managers/ScrollSyncManager.ts",
"prevName":
"packages/diffs/src/ScrollSyncManager.ts
"
,
"prevName": "packages/diffs/src/ScrollSyncManager.ts",
"splitLineCount": 0,
"type": "rename-pure",
"unifiedLineCount": 0,
Expand All @@ -1947,10 +1941,7 @@ exports[`parsePatchFiles should parse diff.patch and match snapshot: git pr patc
"hunks": [],
"isPartial": true,
"name": "packages/diffs/src/managers/UniversalRenderingManager.ts",
"prevName":
"packages/diffs/src/UniversalRenderer.ts
"
,
"prevName": "packages/diffs/src/UniversalRenderer.ts",
"splitLineCount": 0,
"type": "rename-pure",
"unifiedLineCount": 0,
Expand Down Expand Up @@ -71660,10 +71651,7 @@ Subject: [PATCH 7/9] Update test snapshots
"hunks": [],
"isPartial": true,
"name": "apps/docs/app/ssr/SSRPage.tsx",
"prevName":
"apps/docs/app/ssr/SSR_Page.tsx
"
,
"prevName": "apps/docs/app/ssr/SSR_Page.tsx",
"splitLineCount": 0,
"type": "rename-pure",
"unifiedLineCount": 0,
Expand Down
Loading