-
Notifications
You must be signed in to change notification settings - Fork 67
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
Fix directory comparison in changes #140
Fix directory comparison in changes #140
Conversation
Currently string comparison is used to detect changes. The comparisons are already done ordered, however since `-` will compare before `/`, a directory deletion which also has a directory ending with `-` can cause the wrong change output. The comparisons must be done considering directory separators as the lowest sorting value. Signed-off-by: Derek McGowan <[email protected]>
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.
LGTM
{"/dir1/dir2你/", "/dir1/dir2/", 1}, | ||
{"/dir1/dir2你/", "/dir1/dir2你/", 0}, | ||
{"/dir1/dir2你/", "/dir1/dir2你好/", -1}, | ||
{"/dir1/dir2你/", "/dir1/dir2你-好/", -1}, |
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.
@dmcgowan you should try the character biang
😄
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.
no unicode for biang :P
1 maintainer LGTM and 1 reviewer LGTM. Merging. |
- containerd/continuity#140 Fix directory comparison in changes Signed-off-by: Sebastiaan van Stijn <[email protected]>
- containerd/continuity#140 Fix directory comparison in changes Signed-off-by: Sebastiaan van Stijn <[email protected]> Upstream-commit: 447cbff50a91fc66cd1893ebf3fdd8176a4d87bf Component: engine
- containerd/continuity#140 Fix directory comparison in changes Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 447cbff) Signed-off-by: Sebastiaan van Stijn <[email protected]>
- containerd/continuity#140 Fix directory comparison in changes Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit 447cbff50a91fc66cd1893ebf3fdd8176a4d87bf) Signed-off-by: Sebastiaan van Stijn <[email protected]> Upstream-commit: 790388a8c5e5f2ae3afbff29d06b7509882505be Component: engine
- containerd/continuity#140 Fix directory comparison in changes Signed-off-by: Sebastiaan van Stijn <[email protected]>
Currently string comparison is used to detect changes. The comparisons are already done ordered, however since
-
will compare before/
, a directory deletion which also has a directory ending with-
can cause the wrong change output. The comparisons must be done considering directory separators as the lowest sorting value.Related to moby/buildkit#960