Fossil SCM
Avoid references to private check-ins in Q-cards of public check-in manifests. This ensures consistent behavior regarding leakage of private check-in hashes, possibly generating "phantoms" on peer repositories, for P- and Q-cards. Depending on the final strategy to minimize leakage and sync traffic overhead of "phantoms", this commit may eventually be reverted.
Commit
767b175d906b9aef35a4aad16bcead732f6db23df0d5e96a99e910c5242f0b0c
Parent
4e2498a2b67ce2f…
1 file changed
+2
-3
+2
-3
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -1641,13 +1641,12 @@ | ||
| 1641 | 1641 | " WHERE (vmerge.id=-1 OR vmerge.id=-2)" |
| 1642 | 1642 | " ORDER BY 1"); |
| 1643 | 1643 | while( db_step(&q)==SQLITE_ROW ){ |
| 1644 | 1644 | const char *zCherrypickUuid = db_column_text(&q, 0); |
| 1645 | 1645 | int mid = db_column_int(&q, 1); |
| 1646 | - if( mid != vid ){ | |
| 1647 | - blob_appendf(pOut, "Q %s\n", zCherrypickUuid); | |
| 1648 | - } | |
| 1646 | + if( (!g.markPrivate && content_is_private(mid)) || (mid == vid) ) continue; | |
| 1647 | + blob_appendf(pOut, "Q %s\n", zCherrypickUuid); | |
| 1649 | 1648 | } |
| 1650 | 1649 | db_finalize(&q); |
| 1651 | 1650 | |
| 1652 | 1651 | if( p->pCksum ) blob_appendf(pOut, "R %b\n", p->pCksum); |
| 1653 | 1652 | zColor = p->zColor; |
| 1654 | 1653 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1641,13 +1641,12 @@ | |
| 1641 | " WHERE (vmerge.id=-1 OR vmerge.id=-2)" |
| 1642 | " ORDER BY 1"); |
| 1643 | while( db_step(&q)==SQLITE_ROW ){ |
| 1644 | const char *zCherrypickUuid = db_column_text(&q, 0); |
| 1645 | int mid = db_column_int(&q, 1); |
| 1646 | if( mid != vid ){ |
| 1647 | blob_appendf(pOut, "Q %s\n", zCherrypickUuid); |
| 1648 | } |
| 1649 | } |
| 1650 | db_finalize(&q); |
| 1651 | |
| 1652 | if( p->pCksum ) blob_appendf(pOut, "R %b\n", p->pCksum); |
| 1653 | zColor = p->zColor; |
| 1654 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1641,13 +1641,12 @@ | |
| 1641 | " WHERE (vmerge.id=-1 OR vmerge.id=-2)" |
| 1642 | " ORDER BY 1"); |
| 1643 | while( db_step(&q)==SQLITE_ROW ){ |
| 1644 | const char *zCherrypickUuid = db_column_text(&q, 0); |
| 1645 | int mid = db_column_int(&q, 1); |
| 1646 | if( (!g.markPrivate && content_is_private(mid)) || (mid == vid) ) continue; |
| 1647 | blob_appendf(pOut, "Q %s\n", zCherrypickUuid); |
| 1648 | } |
| 1649 | db_finalize(&q); |
| 1650 | |
| 1651 | if( p->pCksum ) blob_appendf(pOut, "R %b\n", p->pCksum); |
| 1652 | zColor = p->zColor; |
| 1653 |