Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Avoid showing a short block of unchanged code at the end of a unified diff. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
ba433cc4fc2cf67c07fbae0c16c57914 |
| User & Date: | drh 2008-02-08 17:22:57.000 |
Context
|
2008-02-08
| ||
| 17:27 | Merge two branches that were created within one second of one another. There is a race condition in the anti-forking logic that allowed this fork to occur. ... (check-in: 373e42de1d user: drh tags: trunk) | |
| 17:22 | Avoid showing a short block of unchanged code at the end of a unified diff. ... (check-in: ba433cc4fc user: drh tags: trunk) | |
| 16:24 | Fail with an error if a file is outside the checkout tree. ... (check-in: b3ec774ab7 user: drh tags: trunk) | |
Changes
Changes to src/diff.c.
| ︙ | ︙ | |||
209 210 211 212 213 214 215 | int m; /* Number of lines to output */ int skip; /* Number of lines to skip */ A = p->aFrom; B = p->aTo; R = p->aEdit; mxr = p->nEdit; | | | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
int m; /* Number of lines to output */
int skip; /* Number of lines to skip */
A = p->aFrom;
B = p->aTo;
R = p->aEdit;
mxr = p->nEdit;
while( mxr>2 && R[mxr-1]==0 && R[mxr-2]==0 ){ mxr -= 3; }
for(r=0; r<mxr; r += 3*nr){
/* Figure out how many triples to show in a single block */
for(nr=1; R[r+nr*3]>0 && R[r+nr*3]<nContext*2; nr++){}
/* printf("r=%d nr=%d\n", r, nr); */
/* For the current block comprising nr triples, figure out
** how many lines of A and B are to be displayed
|
| ︙ | ︙ |