Differences From:
File
src/diffcmd.c
part of check-in
[a51808c0a5]
- Work toward improving the "diff" command. Get the "-r" or "--from" option
working.
by
drh on
2009-11-06 01:59:29.
[view]
To:
File
src/diffcmd.c
part of check-in
[db608ee72f]
- Continuing work on the "diff" command.
by
drh on
2009-11-06 02:47:30.
[view]
@@ -167,9 +167,9 @@
blob_appendf(&sql,
"SELECT v2.pathname, v2.deleted, v2.chnged, v2.rid==0, v1.rid"
" FROM vfile v1, vfile v2 "
" WHERE v1.pathname=v2.pathname AND v1.vid=%d AND v2.vid=%d"
- " AND (v2.deleted OR v2.chnged OR v2.rid==0)"
+ " AND (v2.deleted OR v2.chnged OR v1.rid!=v2.rid)"
"UNION "
"SELECT pathname, 1, 0, 0, 0"
" FROM vfile v1"
" WHERE v1.vid=%d"
@@ -268,12 +268,12 @@
zTo = find_option("to", 0, 1);
if( zTo==0 ){
db_must_be_within_tree();
- if( !isInternDiff ){
+ verify_all_options();
+ if( !isInternDiff && g.argc==3 ){
zDiffCmd = db_get(isGDiff ? "gdiff-command" : "diff-command", 0);
}
- verify_all_options();
if( g.argc==3 ){
diff_one_against_disk(zFrom, zDiffCmd);
}else{
diff_all_against_disk(zFrom, zDiffCmd);
@@ -281,12 +281,12 @@
}else if( zFrom==0 ){
fossil_fatal("must use --from if --to is present");
}else{
db_find_and_open_repository(1);
- if( !isInternDiff ){
+ verify_all_options();
+ if( !isInternDiff && g.argc==3 ){
zDiffCmd = db_get(isGDiff ? "gdiff-command" : "diff-command", 0);
}
- verify_all_options();
fossil_fatal("--to not yet implemented");
#if 0
if( g.argc==3 ){
diff_one_two_versions(zFrom, zTo, zDiffCmd);