Neither the client (src/client/client_cli.c) nor the server (src/server/server.c) supports a --version flag. The PROTOCOL_VERSION macro exists in src/shared/config.h as 1.2.0, but there is no way for users to query the version at runtime.
Location
src/client/client_cli.c (around line 83, where --help is handled) src/server/server.c (around line 149, where --help is handled)
Suggested Fix
Add a --version flag handler in both binaries that prints the version string from PROTOCOL_VERSION and exits successfully:
if(strcmp(argv[i],"--version")==0){printf("FastSync version %s\n",PROTOCOL_VERSION);return0;}
Consider defining a separate FASTSYNC_VERSION macro for the application version distinct from the protocol version.
Severity
Low
Category
Enhancement
## Description
Neither the client (`src/client/client_cli.c`) nor the server (`src/server/server.c`) supports a `--version` flag. The `PROTOCOL_VERSION` macro exists in `src/shared/config.h` as `1.2.0`, but there is no way for users to query the version at runtime.
## Location
`src/client/client_cli.c` (around line 83, where `--help` is handled)
`src/server/server.c` (around line 149, where `--help` is handled)
## Suggested Fix
Add a `--version` flag handler in both binaries that prints the version string from `PROTOCOL_VERSION` and exits successfully:
```c
if (strcmp(argv[i], "--version") == 0) {
printf("FastSync version %s\n", PROTOCOL_VERSION);
return 0;
}
```
Consider defining a separate `FASTSYNC_VERSION` macro for the application version distinct from the protocol version.
## Severity
Low
## Category
Enhancement
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
Neither the client (
src/client/client_cli.c) nor the server (src/server/server.c) supports a--versionflag. ThePROTOCOL_VERSIONmacro exists insrc/shared/config.has1.2.0, but there is no way for users to query the version at runtime.Location
src/client/client_cli.c(around line 83, where--helpis handled)src/server/server.c(around line 149, where--helpis handled)Suggested Fix
Add a
--versionflag handler in both binaries that prints the version string fromPROTOCOL_VERSIONand exits successfully:Consider defining a separate
FASTSYNC_VERSIONmacro for the application version distinct from the protocol version.Severity
Low
Category
Enhancement