Fossil SCM

Fix a bug in the merge file-rename detection logic, a bug introduced by the path refactoring changes.

drh 2011-03-14 13:22 trunk
Commit 66951fa6bd0d7a93a5ee8ac807391de4b2d8903c
1 file changed +5 -1
+5 -1
--- src/path.c
+++ src/path.c
@@ -126,11 +126,14 @@
126126
PathNode *pPrev;
127127
PathNode *p;
128128
129129
path_reset();
130130
path.pStart = path_new_node(iFrom, 0, 0);
131
- if( iTo==iFrom ) return path.pStart;
131
+ if( iTo==iFrom ){
132
+ path.pEnd = path.pStart;
133
+ return path.pStart;
134
+ }
132135
if( directOnly ){
133136
db_prepare(&s,
134137
"SELECT cid, 1 FROM plink WHERE pid=:pid AND isprim "
135138
"UNION ALL "
136139
"SELECT pid, 0 FROM plink WHERE cid=:pid AND isprim"
@@ -360,10 +363,11 @@
360363
int i; /* Loop counter */
361364
Stmt q1; /* Query of name changes */
362365
363366
*pnChng = 0;
364367
*aiChng = 0;
368
+ if( iFrom==iTo ) return;
365369
path_reset();
366370
p = path_shortest(iFrom, iTo, 0);
367371
if( p==0 ) return;
368372
path_reverse_path();
369373
db_prepare(&q1,
370374
--- src/path.c
+++ src/path.c
@@ -126,11 +126,14 @@
126 PathNode *pPrev;
127 PathNode *p;
128
129 path_reset();
130 path.pStart = path_new_node(iFrom, 0, 0);
131 if( iTo==iFrom ) return path.pStart;
 
 
 
132 if( directOnly ){
133 db_prepare(&s,
134 "SELECT cid, 1 FROM plink WHERE pid=:pid AND isprim "
135 "UNION ALL "
136 "SELECT pid, 0 FROM plink WHERE cid=:pid AND isprim"
@@ -360,10 +363,11 @@
360 int i; /* Loop counter */
361 Stmt q1; /* Query of name changes */
362
363 *pnChng = 0;
364 *aiChng = 0;
 
365 path_reset();
366 p = path_shortest(iFrom, iTo, 0);
367 if( p==0 ) return;
368 path_reverse_path();
369 db_prepare(&q1,
370
--- src/path.c
+++ src/path.c
@@ -126,11 +126,14 @@
126 PathNode *pPrev;
127 PathNode *p;
128
129 path_reset();
130 path.pStart = path_new_node(iFrom, 0, 0);
131 if( iTo==iFrom ){
132 path.pEnd = path.pStart;
133 return path.pStart;
134 }
135 if( directOnly ){
136 db_prepare(&s,
137 "SELECT cid, 1 FROM plink WHERE pid=:pid AND isprim "
138 "UNION ALL "
139 "SELECT pid, 0 FROM plink WHERE cid=:pid AND isprim"
@@ -360,10 +363,11 @@
363 int i; /* Loop counter */
364 Stmt q1; /* Query of name changes */
365
366 *pnChng = 0;
367 *aiChng = 0;
368 if( iFrom==iTo ) return;
369 path_reset();
370 p = path_shortest(iFrom, iTo, 0);
371 if( p==0 ) return;
372 path_reverse_path();
373 db_prepare(&q1,
374

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button