mirror of
https://github.com/ModernRelay/omnigraph.git
synced 2026-06-21 02:28:07 +02:00
refactor(cli,server): rename the --target flag to --graph (no alias)
The graph-selection flag is now `--graph` (the canonical noun, matching `graphs:`/`cli.graph`) with NO `--target` compat alias — a clean break, to avoid two-names-for-one-thing confusion. Applied across the 21 `omnigraph` subcommands and the `omnigraph-server` binary (the field stays `target` internally; `value_name = "GRAPH"` keeps help text clean). Updates the user-facing "no graph to serve" and stored-query selection-hint error messages, plus the two cli.rs tests that drove `--target`. Breaking: `--target` is removed (now an unknown-flag error); use `--graph`. `uri` is unchanged (positional or `--uri` per command — deliberately not folded into a shared arg, since the two uri patterns can't share one flattened definition without a breaking uri-form change). `--target-branch` (policy explain) is unrelated and untouched. Code comments and docs still referencing `--target` are swept in L8 with the docs.
This commit is contained in:
parent
f3331edd51
commit
fada7cf404
4 changed files with 28 additions and 28 deletions
|
|
@ -1050,8 +1050,8 @@ pub fn load_server_settings(
|
|||
} else {
|
||||
// Rule 5 → error with migration hint.
|
||||
bail!(
|
||||
"no graph to serve: pass a URI (`omnigraph-server <URI>`), select a target \
|
||||
(`--target <name> --config omnigraph.yaml`), set `server.graph: <name>` in \
|
||||
"no graph to serve: pass a URI (`omnigraph-server <URI>`), select a graph \
|
||||
(`--graph <name> --config omnigraph.yaml`), set `server.graph: <name>` in \
|
||||
omnigraph.yaml, or for multi-graph mode add a `graphs:` map to the config \
|
||||
file referenced by `--config`."
|
||||
);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use omnigraph_server::{ServerConfig, init_tracing, load_server_settings, serve};
|
|||
struct Cli {
|
||||
/// Graph URI
|
||||
uri: Option<String>,
|
||||
#[arg(long)]
|
||||
#[arg(long = "graph", value_name = "GRAPH")]
|
||||
target: Option<String>,
|
||||
#[arg(long)]
|
||||
config: Option<PathBuf>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue