Skip to content

Commit 95c987e

Browse files
LemmingAvalanchegitster
authored andcommitted
advice: make all entries stylistically consistent
In general, rewrite entries to the following form: 1. Clause or sentence describing when the advice is shown 2. Optional “to <verb>” clause which says what the advice is about (e.g. for resetNoRefresh: tell the user that they can use `--no-refresh`) Concretely: 1. Use “shown” instead of “advice shown” • “advice” is implied and a bit repetitive 2. Use “when” instead of “if” 3. Lead with “Shown when” and end the entry with the effect it has, where applicable 4. Use “the user” instead of “a user” or “you” 5. implicitIdentity: rewrite description in order to lead with *when* the advice is shown (see point (3)) 6. Prefer the present tense (with the exception of pushNonFFMatching) 7. waitingForEditor: give example of relevance in this new context 8. pushUpdateRejected: exception to the above principles Signed-off-by: Kristoffer Haugsbakk <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8c5001c commit 95c987e

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

Documentation/config/advice.txt

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ advice.*::
66
+
77
--
88
addEmbeddedRepo::
9-
Advice on what to do when you've accidentally added one
9+
Shown when the user accidentally adds one
1010
git repo inside of another.
1111
addEmptyPathspec::
12-
Advice shown if a user runs the add command without providing
12+
Shown when the user runs the add command without providing
1313
the pathspec parameter.
1414
addIgnoredFile::
15-
Advice shown if a user attempts to add an ignored file to
15+
Shown when the user attempts to add an ignored file to
1616
the index.
1717
amWorkDir::
18-
Advice that shows the location of the patch file when
19-
linkgit:git-am[1] fails to apply it.
18+
Shown when linkgit:git-am[1] fails to apply a patch
19+
file, to tell the user the location of the file.
2020
ambiguousFetchRefspec::
21-
Advice shown when a fetch refspec for multiple remotes maps to
21+
Shown when a fetch refspec for multiple remotes maps to
2222
the same remote-tracking branch namespace and causes branch
2323
tracking set-up to fail.
2424
checkoutAmbiguousRemoteBranchName::
25-
Advice shown when the argument to
25+
Shown when the argument to
2626
linkgit:git-checkout[1] and linkgit:git-switch[1]
2727
ambiguously resolves to a
2828
remote tracking branch on more than one remote in
@@ -33,31 +33,31 @@ advice.*::
3333
to be used by default in some situations where this
3434
advice would be printed.
3535
commitBeforeMerge::
36-
Advice shown when linkgit:git-merge[1] refuses to
36+
Shown when linkgit:git-merge[1] refuses to
3737
merge to avoid overwriting local changes.
3838
detachedHead::
39-
Advice shown when you used
39+
Shown when the user uses
4040
linkgit:git-switch[1] or linkgit:git-checkout[1]
41-
to move to the detached HEAD state, to instruct how to
42-
create a local branch after the fact.
41+
to move to the detached HEAD state, to tell the user how
42+
to create a local branch after the fact.
4343
diverging::
44-
Advice shown when a fast-forward is not possible.
44+
Shown when a fast-forward is not possible.
4545
fetchShowForcedUpdates::
46-
Advice shown when linkgit:git-fetch[1] takes a long time
46+
Shown when linkgit:git-fetch[1] takes a long time
4747
to calculate forced updates after ref updates, or to warn
4848
that the check is disabled.
4949
forceDeleteBranch::
50-
Advice shown when a user tries to delete a not fully merged
50+
Shown when the user tries to delete a not fully merged
5151
branch without the force option set.
5252
ignoredHook::
53-
Advice shown if a hook is ignored because the hook is not
53+
Shown when a hook is ignored because the hook is not
5454
set as executable.
5555
implicitIdentity::
56-
Advice on how to set your identity configuration when
57-
your information is guessed from the system username and
58-
domain name.
56+
Shown when the user's information is guessed from the
57+
system username and domain name, to tell the user how to
58+
set their identity configuration.
5959
nestedTag::
60-
Advice shown if a user attempts to recursively tag a tag object.
60+
Shown when a user attempts to recursively tag a tag object.
6161
pushAlreadyExists::
6262
Shown when linkgit:git-push[1] rejects an update that
6363
does not qualify for fast-forwarding (e.g., a tag.)
@@ -71,12 +71,12 @@ advice.*::
7171
object that is not a commit-ish, or make the remote
7272
ref point at an object that is not a commit-ish.
7373
pushNonFFCurrent::
74-
Advice shown when linkgit:git-push[1] fails due to a
74+
Shown when linkgit:git-push[1] fails due to a
7575
non-fast-forward update to the current branch.
7676
pushNonFFMatching::
77-
Advice shown when you ran linkgit:git-push[1] and pushed
78-
'matching refs' explicitly (i.e. you used ':', or
79-
specified a refspec that isn't your current branch) and
77+
Shown when the user ran linkgit:git-push[1] and pushed
78+
'matching refs' explicitly (i.e. used ':', or
79+
specified a refspec that isn't the current branch) and
8080
it resulted in a non-fast-forward error.
8181
pushRefNeedsUpdate::
8282
Shown when linkgit:git-push[1] rejects a forced update of
@@ -95,17 +95,17 @@ advice.*::
9595
'pushFetchFirst', 'pushNeedsForce', and 'pushRefNeedsUpdate'
9696
simultaneously.
9797
resetNoRefresh::
98-
Advice to consider using the `--no-refresh` option to
99-
linkgit:git-reset[1] when the command takes more than 2 seconds
100-
to refresh the index after reset.
98+
Shown when linkgit:git-reset[1] takes more than 2
99+
seconds to refresh the index after reset, to tell the user
100+
that they can use the `--no-refresh` option.
101101
resolveConflict::
102-
Advice shown by various commands when conflicts
102+
Shown by various commands when conflicts
103103
prevent the operation from being performed.
104104
rmHints::
105-
In case of failure in the output of linkgit:git-rm[1],
106-
show directions on how to proceed from the current state.
105+
Shown on failure in the output of linkgit:git-rm[1], to
106+
give directions on how to proceed from the current state.
107107
sequencerInUse::
108-
Advice shown when a sequencer command is already in progress.
108+
Shown when a sequencer command is already in progress.
109109
skippedCherryPicks::
110110
Shown when linkgit:git-rebase[1] skips a commit that has already
111111
been cherry-picked onto the upstream branch.
@@ -123,27 +123,27 @@ advice.*::
123123
by linkgit:git-switch[1] or
124124
linkgit:git-checkout[1] when switching branches.
125125
statusUoption::
126-
Advise to consider using the `-u` option to linkgit:git-status[1]
127-
when the command takes more than 2 seconds to enumerate untracked
128-
files.
126+
Shown when linkgit:git-status[1] takes more than 2
127+
seconds to enumerate untracked files, to tell the user that
128+
they can use the `-u` option.
129129
submoduleAlternateErrorStrategyDie::
130-
Advice shown when a submodule.alternateErrorStrategy option
130+
Shown when a submodule.alternateErrorStrategy option
131131
configured to "die" causes a fatal error.
132132
submodulesNotUpdated::
133-
Advice shown when a user runs a submodule command that fails
133+
Shown when a user runs a submodule command that fails
134134
because `git submodule update --init` was not run.
135135
suggestDetachingHead::
136-
Advice shown when linkgit:git-switch[1] refuses to detach HEAD
136+
Shown when linkgit:git-switch[1] refuses to detach HEAD
137137
without the explicit `--detach` option.
138138
updateSparsePath::
139-
Advice shown when either linkgit:git-add[1] or linkgit:git-rm[1]
139+
Shown when either linkgit:git-add[1] or linkgit:git-rm[1]
140140
is asked to update index entries outside the current sparse
141141
checkout.
142142
waitingForEditor::
143-
Print a message to the terminal whenever Git is waiting for
144-
editor input from the user.
143+
Shown when Git is waiting for editor input. Relevant
144+
when e.g. the editor is not launched inside the terminal.
145145
worktreeAddOrphan::
146-
Advice shown when a user tries to create a worktree from an
147-
invalid reference, to instruct how to create a new unborn
146+
Shown when the user tries to create a worktree from an
147+
invalid reference, to tell the user how to create a new unborn
148148
branch instead.
149149
--

0 commit comments

Comments
 (0)