Fossil SCM
For the "fossil info" command from without an open check-out, only show the alt-root and access-url information if the --detail or -l options are given.
Commit
f1487280a8752504ccd31c0e1a7dd4ce14046581
Parent
2079981fd6b9c11…
1 file changed
+3
-1
+3
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -171,15 +171,17 @@ | ||
| 171 | 171 | ** file in a checkout. |
| 172 | 172 | ** |
| 173 | 173 | ** Options: |
| 174 | 174 | ** |
| 175 | 175 | ** -R|--repository FILE Extract info from repository FILE |
| 176 | +** -l|--detail Show extra information | |
| 176 | 177 | ** |
| 177 | 178 | ** See also: annotate, artifact, finfo, timeline |
| 178 | 179 | */ |
| 179 | 180 | void info_cmd(void){ |
| 180 | 181 | i64 fsize; |
| 182 | + int bDetail = find_option("detail","l",0)!=0; | |
| 181 | 183 | if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){ |
| 182 | 184 | db_open_config(0); |
| 183 | 185 | db_record_repository_filename(g.argv[2]); |
| 184 | 186 | db_open_repository(g.argv[2]); |
| 185 | 187 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| @@ -195,11 +197,11 @@ | ||
| 195 | 197 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| 196 | 198 | if( g.localOpen ){ |
| 197 | 199 | fossil_print("repository: %s\n", db_repository_filename()); |
| 198 | 200 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 199 | 201 | } |
| 200 | - extraRepoInfo(); | |
| 202 | + if( bDetail ) extraRepoInfo(); | |
| 201 | 203 | #if defined(_WIN32) |
| 202 | 204 | if( g.zHome ){ |
| 203 | 205 | fossil_print("user-home: %s\n", g.zHome); |
| 204 | 206 | } |
| 205 | 207 | #endif |
| 206 | 208 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -171,15 +171,17 @@ | |
| 171 | ** file in a checkout. |
| 172 | ** |
| 173 | ** Options: |
| 174 | ** |
| 175 | ** -R|--repository FILE Extract info from repository FILE |
| 176 | ** |
| 177 | ** See also: annotate, artifact, finfo, timeline |
| 178 | */ |
| 179 | void info_cmd(void){ |
| 180 | i64 fsize; |
| 181 | if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){ |
| 182 | db_open_config(0); |
| 183 | db_record_repository_filename(g.argv[2]); |
| 184 | db_open_repository(g.argv[2]); |
| 185 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| @@ -195,11 +197,11 @@ | |
| 195 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| 196 | if( g.localOpen ){ |
| 197 | fossil_print("repository: %s\n", db_repository_filename()); |
| 198 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 199 | } |
| 200 | extraRepoInfo(); |
| 201 | #if defined(_WIN32) |
| 202 | if( g.zHome ){ |
| 203 | fossil_print("user-home: %s\n", g.zHome); |
| 204 | } |
| 205 | #endif |
| 206 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -171,15 +171,17 @@ | |
| 171 | ** file in a checkout. |
| 172 | ** |
| 173 | ** Options: |
| 174 | ** |
| 175 | ** -R|--repository FILE Extract info from repository FILE |
| 176 | ** -l|--detail Show extra information |
| 177 | ** |
| 178 | ** See also: annotate, artifact, finfo, timeline |
| 179 | */ |
| 180 | void info_cmd(void){ |
| 181 | i64 fsize; |
| 182 | int bDetail = find_option("detail","l",0)!=0; |
| 183 | if( g.argc==3 && (fsize = file_size(g.argv[2]))>0 && (fsize&0x1ff)==0 ){ |
| 184 | db_open_config(0); |
| 185 | db_record_repository_filename(g.argv[2]); |
| 186 | db_open_repository(g.argv[2]); |
| 187 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| @@ -195,11 +197,11 @@ | |
| 197 | fossil_print("project-name: %s\n", db_get("project-name", "<unnamed>")); |
| 198 | if( g.localOpen ){ |
| 199 | fossil_print("repository: %s\n", db_repository_filename()); |
| 200 | fossil_print("local-root: %s\n", g.zLocalRoot); |
| 201 | } |
| 202 | if( bDetail ) extraRepoInfo(); |
| 203 | #if defined(_WIN32) |
| 204 | if( g.zHome ){ |
| 205 | fossil_print("user-home: %s\n", g.zHome); |
| 206 | } |
| 207 | #endif |
| 208 |