Skip to content

Conversation

@Alizter
Copy link
Collaborator

@Alizter Alizter commented Oct 23, 2025

The first commit reproduces the issue in #8075.

When we use "git diff" as the diff tool, we have some logic to resolve symlinks since "git diff" doesn't handle them. This logic doesn't take into account the case where the target of a symlink doesn't exist, which happens when the file you are promoting doesn't exist yet.

This can easily be fixed by taking into account this case.

TODO

@Alizter Alizter force-pushed the push-sqrpzslmkvzl branch 2 times, most recently from 77a862f to 743a9ff Compare October 28, 2025 15:22
@Alizter Alizter force-pushed the push-sqrpzslmkvzl branch 3 times, most recently from 0d8f21f to 66f5f2d Compare November 12, 2025 12:53
@Alizter Alizter requested a review from rgrinberg November 12, 2025 12:53
Copy link
Member

@rgrinberg rgrinberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI seems to be broken. Maybe you need to init a repo so that git doesn't get confused?

@Alizter Alizter marked this pull request as draft November 12, 2025 14:01
@Alizter Alizter force-pushed the push-sqrpzslmkvzl branch 2 times, most recently from 58bb639 to 94a1947 Compare November 12, 2025 16:10
@Alizter Alizter marked this pull request as ready for review November 12, 2025 16:19
@Alizter Alizter requested a review from rgrinberg November 12, 2025 16:20
@rgrinberg
Copy link
Member

Same issue.

@Alizter Alizter marked this pull request as draft November 12, 2025 22:25
Signed-off-by: Ali Caglayan <[email protected]>
When we use "git diff" as the git tool, we have some logic to resolve
symlinks since "git diff" doesn't handle them. This logic doesn't take
into account the case where the target of a symlink doesn't exist, which
happens when the file you are promoting doesn't exist yet.

This can easily be fixed by taking into account this case.

Signed-off-by: Ali Caglayan <[email protected]>
@Alizter
Copy link
Collaborator Author

Alizter commented Nov 14, 2025

Initialising the repo did fix it, but now we have errors as the diff programs are not able to diff non-existent files. This will increase the scope of my current fix. I guess that is a separate issue that has to be addressed first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fail to promote over a non-existing file

3 participants