Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Fix diffs from or to an empty file to use the special position marker 0,0. Makes "fossil diff -N" create patches that are accepted by patch. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
4e77507e70d0a467c49c88c1b22a0c46 |
| User & Date: | joerg 2011-03-08 22:13:04.852 |
Context
|
2011-03-09
| ||
| 00:09 | Inline uuid_to_rid and content_size. Saves one SQL statement per file in the checkout. ... (check-in: e0f5d4734a user: joerg tags: trunk) | |
|
2011-03-08
| ||
| 22:13 | Fix diffs from or to an empty file to use the special position marker 0,0. Makes "fossil diff -N" create patches that are accepted by patch. ... (check-in: 4e77507e70 user: joerg tags: trunk) | |
| 19:30 | Add an example of how to include "meld" as the "gmerge-command". ... (check-in: 85b235982e user: drh tags: trunk) | |
Changes
Changes to src/diff.c.
| ︙ | ︙ | |||
233 234 235 236 237 238 239 |
na += R[r+nr*3];
nb += R[r+nr*3];
}
for(i=1; i<nr; i++){
na += R[r+i*3];
nb += R[r+i*3];
}
| > > > > > | > > | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
na += R[r+nr*3];
nb += R[r+nr*3];
}
for(i=1; i<nr; i++){
na += R[r+i*3];
nb += R[r+i*3];
}
/*
* If the patch changes an empty file or results in an empty file,
* the block header must use 0,0 as position indicator and not 1,0.
* Otherwise, patch would be confused and may reject the diff.
*/
blob_appendf(pOut,"@@ -%d,%d +%d,%d @@\n",
na ? a+skip+1 : 0, na,
nb ? b+skip+1 : 0, nb);
/* Show the initial common area */
a += skip;
b += skip;
m = R[r] - skip;
for(j=0; j<m; j++){
appendDiffLine(pOut, " ", &A[a+j]);
|
| ︙ | ︙ |