Fossil SCM

Correct [fossil finfo -n 0] to have no limit, in accordance with documentation. Update documentation to mention that negative numbers also have no limit and that unlimited is the default.

andygoth 2015-03-05 19:18 trunk
Commit 81da7b0024a51b945acc1129f11c6741d06f0a1d
1 file changed +5 -1
+5 -1
--- src/finfo.c
+++ src/finfo.c
@@ -43,11 +43,12 @@
4343
** Options:
4444
** -b|--brief display a brief (one line / revision) summary
4545
** --case-sensitive B Enable or disable case-sensitive filenames. B is a
4646
** boolean: "yes", "no", "true", "false", etc.
4747
** -l|--log select log mode (the default)
48
-** -n|--limit N display the first N changes. N=0 means no limit.
48
+** -n|--limit N Display the first N changes (default unlimited).
49
+** N<=0 means no limit.
4950
** --offset P skip P changes
5051
** -p|--print select print mode
5152
** -r|--revision R print the given revision (or ckout, if none is given)
5253
** to stdout (only in print mode)
5354
** -s|--status select status mode (print a status indicator for FILE)
@@ -155,10 +156,13 @@
155156
zWidth = find_option("width","W",1);
156157
iLimit = zLimit ? atoi(zLimit) : -1;
157158
zOffset = find_option("offset",0,1);
158159
iOffset = zOffset ? atoi(zOffset) : 0;
159160
iBrief = (find_option("brief","b",0) == 0);
161
+ if( iLimit==0 ){
162
+ iLimit = -1;
163
+ }
160164
if( zWidth ){
161165
iWidth = atoi(zWidth);
162166
if( (iWidth!=0) && (iWidth<=22) ){
163167
fossil_fatal("-W|--width value must be >22 or 0");
164168
}
165169
--- src/finfo.c
+++ src/finfo.c
@@ -43,11 +43,12 @@
43 ** Options:
44 ** -b|--brief display a brief (one line / revision) summary
45 ** --case-sensitive B Enable or disable case-sensitive filenames. B is a
46 ** boolean: "yes", "no", "true", "false", etc.
47 ** -l|--log select log mode (the default)
48 ** -n|--limit N display the first N changes. N=0 means no limit.
 
49 ** --offset P skip P changes
50 ** -p|--print select print mode
51 ** -r|--revision R print the given revision (or ckout, if none is given)
52 ** to stdout (only in print mode)
53 ** -s|--status select status mode (print a status indicator for FILE)
@@ -155,10 +156,13 @@
155 zWidth = find_option("width","W",1);
156 iLimit = zLimit ? atoi(zLimit) : -1;
157 zOffset = find_option("offset",0,1);
158 iOffset = zOffset ? atoi(zOffset) : 0;
159 iBrief = (find_option("brief","b",0) == 0);
 
 
 
160 if( zWidth ){
161 iWidth = atoi(zWidth);
162 if( (iWidth!=0) && (iWidth<=22) ){
163 fossil_fatal("-W|--width value must be >22 or 0");
164 }
165
--- src/finfo.c
+++ src/finfo.c
@@ -43,11 +43,12 @@
43 ** Options:
44 ** -b|--brief display a brief (one line / revision) summary
45 ** --case-sensitive B Enable or disable case-sensitive filenames. B is a
46 ** boolean: "yes", "no", "true", "false", etc.
47 ** -l|--log select log mode (the default)
48 ** -n|--limit N Display the first N changes (default unlimited).
49 ** N<=0 means no limit.
50 ** --offset P skip P changes
51 ** -p|--print select print mode
52 ** -r|--revision R print the given revision (or ckout, if none is given)
53 ** to stdout (only in print mode)
54 ** -s|--status select status mode (print a status indicator for FILE)
@@ -155,10 +156,13 @@
156 zWidth = find_option("width","W",1);
157 iLimit = zLimit ? atoi(zLimit) : -1;
158 zOffset = find_option("offset",0,1);
159 iOffset = zOffset ? atoi(zOffset) : 0;
160 iBrief = (find_option("brief","b",0) == 0);
161 if( iLimit==0 ){
162 iLimit = -1;
163 }
164 if( zWidth ){
165 iWidth = atoi(zWidth);
166 if( (iWidth!=0) && (iWidth<=22) ){
167 fossil_fatal("-W|--width value must be >22 or 0");
168 }
169

Keyboard Shortcuts

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