Skip to content

Commit 3de648c

Browse files
committed
docs(init): Add long help for stg init
This expands on the long about that had not been ported from the Python implementation. Includes statement about deinitializing with `stg branch --cleanup`. Fixes: #233
1 parent 047b249 commit 3de648c

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/cmd/init.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,22 @@ pub(super) const STGIT_COMMAND: super::StGitCommand = super::StGitCommand {
1515
};
1616

1717
fn make() -> clap::Command {
18-
clap::Command::new(STGIT_COMMAND.name).about("Initialize a StGit stack on current branch")
18+
clap::Command::new(STGIT_COMMAND.name)
19+
.about("Initialize a StGit stack on current branch")
20+
.long_about(
21+
"Initialize a StGit stack on the current branch.\n\
22+
\n\
23+
A branch must be initialized with a StGit stack before patches may be \
24+
created with 'stg new', imported with 'stg import', or picked with 'stg \
25+
pick'.\n\
26+
\n\
27+
The branch and its git repository must already exist and contain at least \
28+
one commit before initializing a StGit stack. Branches created with `stg \
29+
branch --create` are automatically initialized.\n\
30+
\n\
31+
StGit stack metadata can be deinitialized from a branch using `stg branch \
32+
--cleanup`. See 'stg branch' for more details.",
33+
)
1934
}
2035

2136
fn run(_: &ArgMatches) -> Result<()> {

0 commit comments

Comments
 (0)