https://github.com/vim/vim/pull/9344
(1 file)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
![]()
@lewis6991 pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
@lewis6991 pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
@lewis6991 pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
@lewis6991 pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
@lewis6991 pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
@lewis6991 commented on this pull request.
In src/diff.c:
> - // - // unified diff looks like this: - // --- file1 2018-03-20 13:23:35.783153140 +0100 - // +++ file2 2018-03-20 13:23:41.183156066 +0100 - // @@ -1,3 +1,5 @@ - if (isdigit(*line)) - diffstyle = DIFF_ED; - else if ((STRNCMP(line, "@@ ", 3) == 0)) - diffstyle = DIFF_UNIFIED; - else if ((STRNCMP(line, "--- ", 4) == 0) - && (vim_fgets(linebuf, LBUFLEN, fd) == 0) - && (STRNCMP(line, "+++ ", 4) == 0) - && (vim_fgets(linebuf, LBUFLEN, fd) == 0) - && (STRNCMP(line, "@@ ", 3) == 0)) - diffstyle = DIFF_UNIFIED; + if (fd == NULL)
Diff from here to line 1730 is unchanged and just indented.
@lewis6991 pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
@lewis6991 pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
@lewis6991 pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
@lewis6991 pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
@lewis6991 pushed 1 commit.
—
You are receiving this because you are subscribed to this thread.
@lewis6991 pushed 1 commit.
- 45c4fdc xdiff: Use hunk_func instead of out_line
very nice. So instead of calling the xdiff-callback for each line, we only call it per hunk. I like it.
Small nit:
Instead of adding a separate argument to diff_read like this:
diff_read(idx_orig, idx_new, &dio->dio_diff, dio->dio_internal);
I would just pass down the dio structure.
Also I noticed there are several test failures, that indicates that the diffing currently does not work? So it doesn't really look ready yet? Check Test_diff_filler() for a simple test that fails with the expected number of filler lines.
@dpelle commented on this pull request.
In src/diff.c:
> - emsg(_("E959: Invalid diff format."));
- break;
+ if (diffstyle == DIFF_NONE)
+ {
+ // Determine diff style.
+ // ed like diff looks like this:
+ // {first}[,{last}]c{first}[,{last}]
+ // {first}a{first}[,{last}]
+ // {first}[,{last}]d{first}
+ //
+ // unified diff looks like this:
+ // --- file1 2018-03-20 13:23:35.783153140 +0100
+ // +++ file2 2018-03-20 13:23:41.183156066 +0100
+ // @@ -1,3 +1,5 @@
+ if (isdigit(*line))
+ diffstyle = DIFF_ED;
Indentation looks inconsistent with the indentation in else block.
very nice. So instead of calling the xdiff-callback for each line, we only call it per hunk. I like it.
Small nit:
Instead of adding a separate argument to
diff_readlike this:diff_read(idx_orig, idx_new, &dio->dio_diff, dio->dio_internal);I would just pass down the
diostructure.
Sure will do.
Also I noticed there are several test failures, that indicates that the diffing currently does not work? So it doesn't really look ready yet? Check
Test_diff_filler()for a simple test that fails with the expected number of filler lines.
The offsets applied are probably slightly wrong. I adapted this from Lua which has 1-indexing.
@lewis6991 pushed 1 commit.
You are receiving this because you are subscribed to this thread.![]()
@lewis6991 pushed 1 commit.
You are receiving this because you are subscribed to this thread.![]()
@lewis6991 pushed 1 commit.
You are receiving this because you are subscribed to this thread.![]()
@lewis6991 pushed 1 commit.
You are receiving this because you are subscribed to this thread.![]()
Merging #9344 (2418236) into master (1e78deb) will decrease coverage by
87.86%.
The diff coverage is0.07%.
❗ Current head 2418236 differs from pull request most recent head b8a2c93. Consider uploading reports for the commit b8a2c93 to get more accurate results
@@ Coverage Diff @@ ## master #9344 +/- ## =========================================== - Coverage 90.32% 2.45% -87.87% =========================================== Files 151 152 +1 Lines 172721 167652 -5069 =========================================== - Hits 156004 4118 -151886 - Misses 16717 163534 +146817
| Flag | Coverage Δ | |
|---|---|---|
| huge-clang-none | ? |
|
| huge-gcc-none | ? |
|
| huge-gcc-testgui | ? |
|
| huge-gcc-unittests | 2.45% <0.07%> (-0.01%) |
⬇️ |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/autocmd.c | 2.02% <0.00%> (-90.45%) |
⬇️ |
| src/blob.c | 0.00% <0.00%> (-92.60%) |
⬇️ |
| src/buffer.c | 3.45% <0.00%> (-89.28%) |
⬇️ |
| src/dict.c | 5.47% <0.00%> (-86.89%) |
⬇️ |
| src/diff.c | 0.00% <0.00%> (-91.19%) |
⬇️ |
| src/digraph.c | 0.00% <0.00%> (-96.38%) |
⬇️ |
| src/drawscreen.c | 1.62% <0.00%> (-85.15%) |
⬇️ |
| src/edit.c | 0.00% <0.00%> (-93.18%) |
⬇️ |
| src/eval.c | 0.10% <0.00%> (-95.93%) |
⬇️ |
| src/evalfunc.c | 0.00% <0.00%> (-96.54%) |
⬇️ |
| ... and 175 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update 1e78deb...b8a2c93. Read the comment docs.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
so, is this ready?
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Yes this should be good for another review.
I fixed all the related CI failures. The remaining look unrelated to me.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@chrisbra let me know if this should be included now.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Yes, can be included now. Note: I had some problems applying the patch when using the patch file: https://patch-diff.githubusercontent.com/raw/vim/vim/pull/9344.patch (git complained about some unwanted whitespace changes as well as an un-parseable diff header. Using the diff file however worked: https://patch-diff.githubusercontent.com/raw/vim/vim/pull/9344.diff without any problems.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()