-
Notifications
You must be signed in to change notification settings - Fork 454
fix: promotion over non-existent file #12615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
test/blackbox-tests/test-cases/promote/symlink-to-nonexistent.t
Outdated
Show resolved
Hide resolved
77a862f to
743a9ff
Compare
0d8f21f to
66f5f2d
Compare
rgrinberg
left a comment
There was a problem hiding this 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?
58bb639 to
94a1947
Compare
|
Same issue. |
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]>
94a1947 to
20d2580
Compare
|
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. |
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