fork-dev / Tracker

Bug and issue tracker for Fork for Mac
505 stars 12 forks source link

"typechange" not handled properly from symlink to file #1938

Open liamjones opened 1 year ago

liamjones commented 1 year ago

In a monorepo, had a symlink at packages/apps/lw-app/babel.config.js which pointed at ../_common/babel.config.js. Replaced the symlink with a file with JS directly inside it instead.

Output from git status and git diff --cached shows the type and contents change:

image

Fork shows the file starting with containing the symlink path (same as git diff represents symlinks) but ending up as having no contents at all:

image

DanPristupov commented 1 year ago

Output from git status and git diff --cached shows the type and contents change:

Your screenshot doesn't show the actual result.

The actual result is two diffs and Fork can only show the first one because there is just a single diff view.

liamjones commented 1 year ago

Ah, because it's seen as a separate delete and add rather than a modification?

DanPristupov commented 1 year ago

it's seen as a separate delete and add rather than a modification?

Yes, that's right.

liamjones commented 1 year ago

Thanks for the explanation Dan. Do you want me to close this issue then or is it something you'd like to support in Fork in future?