-
Notifications
You must be signed in to change notification settings - Fork 400
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
avoid negative repeat_count fixes #1760 #1766
Open
lrfurtado
wants to merge
1
commit into
dandavison:main
Choose a base branch
from
lrfurtado:fix-1760-capacity-overflow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2137,6 +2137,31 @@ src/align.rs:71: impl<'a> Alignment<'a> { │ | |
"###); | ||
} | ||
|
||
#[test] #[ignore] | ||
fn test_long_line_underflow() { | ||
let output = DeltaTest::with_args(&["--width" , "111", "--zero-style", "syntax #FFFFFF"]).with_input(GIT_DIFF_LONG_LINE).skip_header(); | ||
|
||
assert_snapshot!(output, @r###" | ||
foobar | ||
─────────────────────────────────────────────────────────────────────────────────────────────────────────────── | ||
|
||
────────────────────────────────┐ | ||
14: function UNDERFLOW_EXEC() { │ | ||
────────────────────────────────┘ | ||
XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX | ||
} | ||
|
||
|
||
|
||
echo "=== VALIDATE UNDERFLOW" | ||
/usr/local/bin/check_underflow | ||
|
||
# this is an example of the underflow error | ||
echo "=== UNDERFLOW_EXEC" | ||
UNDERFLOW_EXEC -i foobar.yaml | ||
"###); | ||
} | ||
|
||
const GIT_DIFF_SINGLE_HUNK: &str = "\ | ||
commit 94907c0f136f46dc46ffae2dc92dca9af7eb7c2e | ||
Author: Dan Davison <[email protected]> | ||
|
@@ -3125,4 +3150,30 @@ index 53f98b6..14d6caa 100644 | |
三æäöø€ÆÄÖ〇Øß三 | ||
¶ | ||
"; | ||
|
||
const GIT_DIFF_LONG_LINE: &str = r#"\ | ||
commit XXXXXXXXXXXXXXXXXXXXXXXXX | ||
Author: LUCIANO FURTADO <[email protected]> | ||
Date: Tue Jun 25 14:07:31 2024 -0500 | ||
|
||
Ref: https://github.com/dandavison/delta/issues/1760 | ||
|
||
diff --git a/foobar b/foobar | ||
index 185a33cd5b..123f893935 100755 | ||
--- a/foobar | ||
+++ b/foobar | ||
@@ -14,6 +14,11 @@ function UNDERFLOW_EXEC() { | ||
XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX | ||
} | ||
|
||
+ | ||
+ | ||
+echo "=== VALIDATE UNDERFLOW" | ||
+/usr/local/bin/check_underflow | ||
+ | ||
# this is an example of the underflow error | ||
echo "=== UNDERFLOW_EXEC" | ||
UNDERFLOW_EXEC -i foobar.yaml | ||
|
||
"#; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
You can leave out almost all of these +- lines, as you found out the context before the changed lines was the cause.
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.
any concerns leaving as is ?
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.
Well, it makes the minimal reproducer diff larger than it has to be, and the text sort of indicates that it's these lines. As you have to rebase anyhow to make it build with rust 1.80, maybe you can also trim the added lines down to one or two.