Re: [fossil-users] Minor bug with SEARCH command

2017-05-15 Thread Tony Papadimitriou
An alternate fix for [2d69772e] so that SEARCH without target behaves the same 
both from within an open repo, and with the –R option.

if( g.argc<2 ) return;
blob_init(, g.argc<3?"":g.argv[2], -1);
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Minor bug with SEARCH command

2017-05-10 Thread Jan Nijtmans
2017-05-10 15:17 GMT+02:00 Tony Papadimitriou:
> Now, if the same command is given with the –R option to the same repo (e.g.,
> FOSSIL SEA –R repo.fossil) the results are different, and somewhat random.

Indeed!  Well, a search without an argument seems little useful, so I would
suggest the following patch below (which was probably intended).

We can easily see that when g.argc==2, the blob_init() will
get a random argument, ist just depends what the option
parsing left there.

Regards,
 Jan Nijtmans

--- src/search.c
+++ src/search.c
@@ -597,11 +597,11 @@
   }else{
 width = -1;
   }

   db_find_and_open_repository(0, 0);
-  if( g.argc<2 ) return;
+  if( g.argc<3 ) return;
   blob_init(, g.argv[2], -1);
   for(i=3; i

[fossil-users] Minor bug with SEARCH command

2017-05-10 Thread Tony Papadimitriou
(Tested under Win7)

With FOSSIL SEA from within an open repository up to 1000 lines are printed by 
default. Seems OK.

Now, if the same command is given with the –R option to the same repo (e.g., 
FOSSIL SEA –R repo.fossil) the results are different, and somewhat random.

If an empty string is explicitly provided, the results again seem OK (e.g., 
FOSSIL SEA –R repo.fossil “”)

(It seems like the search target is left uninitialized to empty string in the 
–R case.)

Thanks.___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users