Skip to content

Commit ac22351

Browse files
committed
docs: More inter-command links
1 parent 3de648c commit ac22351

File tree

6 files changed

+32
-33
lines changed

6 files changed

+32
-33
lines changed

src/cmd/branch.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ fn make() -> clap::Command {
7171
unless an optional committish provided for the base.\n\
7272
\n\
7373
StGit attempts to detect the branch from which the new branch forked, as \
74-
well as the remote repository of that parent branch such that \"stg pull\" \
74+
well as the remote repository of that parent branch such that 'stg pull' \
7575
will pull from the correct remote branch. A warning will be printed if the \
76-
parrent branch cannot be determined.",
76+
parent branch cannot be determined.",
7777
)
7878
.arg(
7979
Arg::new("new-branch")
@@ -179,7 +179,7 @@ fn make() -> clap::Command {
179179
\n\
180180
A protected branch will not be cleaned up; it must be unprotected first.\n\
181181
\n\
182-
A cleaned up branch may be reinitialized using \"stg init\".",
182+
A cleaned up branch may be reinitialized using 'stg init'.",
183183
)
184184
.arg(
185185
Arg::new("branch")

src/cmd/edit.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn make() -> clap::Command {
3939
message). The StGit attempts to apply the modified diff to the patch's \
4040
parent tree. If the updated diff does not apply, no changes are made to \
4141
the patch and the edited patch is saved to a file which may be corrected \
42-
and then fed-back into \"stg edit --file\".",
42+
and then fed-back into `stg edit --file`.",
4343
)
4444
.arg(
4545
Arg::new("patch")
@@ -53,12 +53,12 @@ fn make() -> clap::Command {
5353
.short('t')
5454
.help("Set patch's tree to treeish")
5555
.long_help(
56-
"With --set-tree the patch's git tree is set to the specified \
57-
treeish without changing the tree of any other patches. When used \
58-
on the top patch, the index and work tree will be updated to \
59-
match the new tree. This low-level option is primarily meant to \
60-
be used by tools built on top of StGit, such as the Emacs mode. \
61-
See also the '--set-tree' flag of \"stg push\".",
56+
"Set the patch's git tree to the specified treeish without changing \
57+
the tree of any other patches. When used on the top patch, the index \
58+
and work tree will be updated to match the new tree. This low-level \
59+
option is primarily meant to be used by tools built on top of StGit, \
60+
such as the Emacs mode. See also the '--set-tree' flag of 'stg \
61+
push'.",
6262
)
6363
.num_args(1)
6464
.value_name("treeish"),

src/cmd/log.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ fn make() -> clap::Command {
2121
"Show the history of changes to the stack. If one or more patch names are given, \
2222
only the changes affecting those patches are shown.\n\
2323
\n\
24-
The \"stg undo\" and \"stg redo\" commands may be used to step back and forth \
25-
through historical stack states. The \"stg reset\" command may be used to reset \
24+
The 'stg undo' and 'stg redo' commands may be used to step back and forth \
25+
through historical stack states. The 'stg reset' command may be used to reset \
2626
the stack directly to a historic state.\n\
2727
\n\
2828
The --clear option may be used to delete the stack's change history. Undo and redo \

src/cmd/new.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fn make() -> clap::Command {
9999
"Refresh the new patch with changes from work tree. \
100100
New patches are empty by default, but with this option \
101101
the new patch will capture outstanding changes in the work \
102-
tree as if \"stg refresh\" was run. \
102+
tree as if 'stg refresh' was run. \
103103
Use \"--index\" to refresh from the index instead of the work tree.",
104104
)
105105
.action(clap::ArgAction::SetTrue)

src/cmd/redo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn make() -> clap::Command {
2121
.long_about(
2222
"If the last command was an undo, the patch stack state will be reset to its state \
2323
before the undo. Consecutive redos will undo the effects of consecutive invocations \
24-
of \"stg undo\".\n\
24+
of 'stg undo'.\n\
2525
\n\
2626
It is an error to redo if the last stack-modifying command was not an undo.",
2727
)

src/cmd/repair.rs

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,37 @@ fn make() -> clap::Command {
2525
.about("Repair stack after branch is modified with git commands")
2626
.long_about(
2727
"If a branch with a StGit stack is modified with certain git commands such \
28-
as commit, pull, merge, or rebase, the StGit stack metadata will become \
29-
inconsistent with the branch state. There are a few options for resolving \
30-
this kind of situation:\n\
28+
as git-commit(1), git-pull(1), git-merge(1), or git-rebase(1), the StGit \
29+
stack metadata will become inconsistent with the branch state. There are \
30+
a few options for resolving this kind of situation:\n\
3131
\n\
32-
1. Use \"stg undo\" to undo the effect of the git commands. Or similarly \
33-
use \"stg reset\" to reset the stack/branch to any previous stack state.\n\
32+
1. Use 'stg undo' to undo the effect of the git commands. Or similarly \
33+
use 'stg reset' to reset the stack/branch to any previous stack state.\n\
3434
\n\
35-
2. Use \"stg repair\". This will repair the StGit stack metadata to \
35+
2. Use `stg repair`. This will repair the StGit stack metadata to \
3636
accommodate the modifications to the branch made by the git commands. \
3737
Specifically, it will do the following:\n\
3838
\n\
3939
- If regular git commits were made on top of the stack of StGit patches \
40-
(i.e. by using plain \"git commit\"), \"stg repair\" will convert those \
40+
(i.e. by using plain `git commit`), `stg repair` will convert those \
4141
commits to StGit patches, preserving their content.\n\
4242
\n\
4343
- However, merge commits cannot become patches. So if a merge was \
44-
committed on top of the stack, \"stg repair\" will mark all patches below \
44+
committed on top of the stack, `stg repair` will mark all patches below \
4545
the merge commit as unapplied, since they are no longer reachable. An \
46-
alternative when this is not the desired behavior is to use \"stg undo\" \
47-
to first get rid of the offending merge and then run \"stg repair\" \
48-
again.\n\
46+
alternative when this is not the desired behavior is to use `stg undo` to \
47+
first get rid of the offending merge and then run `stg repair` again.\n\
4948
\n\
5049
- The applied patches are supposed to be precisely those that are \
51-
reachable from the branch head. If, for example, \"git reset\" was used \
52-
to move the head, some applied patches may no longer be reachable and \
53-
some unapplied patches may have become reachable. In this case, \"stg \
54-
repair\" will correct the applied/unapplied state of such patches.\n\
50+
reachable from the branch head. If, for example, git-reset(1) was used to \
51+
move the head, some applied patches may no longer be reachable and some \
52+
unapplied patches may have become reachable. In this case, `stg repair` \
53+
will correct the applied/unapplied state of such patches.\n\
5554
\n\
56-
\"stg repair\" will repair these inconsistencies reliably, so there are \
57-
valid workflows where git commands are used followed by \"stg repair\". \
58-
For example, new patches can be created by first making commits with a \
59-
graphical commit tool and then running \"stg repair\" to convert those \
55+
`stg repair` will repair these inconsistencies reliably, so there are \
56+
valid workflows where git commands are used followed by `stg repair`. For \
57+
example, new patches can be created by first making commits with a \
58+
graphical commit tool and then running `stg repair` to convert those \
6059
commits into patches.",
6160
)
6261
}

0 commit comments

Comments
 (0)