Skip to content

Commit fddfaf8

Browse files
phordgitster
authored andcommitted
git-push.txt: clean up force-with-lease wording
The help text for the --force-with-lease option to git-push does not parse cleanly. Clean up the wording and syntax to be more sensible. Also remove redundant information in the "--force-with-lease alone" description. Signed-off-by: Phil Hord <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 282616c commit fddfaf8

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Documentation/git-push.txt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,8 @@ already exists on the remote side.
142142
Usually, "git push" refuses to update a remote ref that is
143143
not an ancestor of the local ref used to overwrite it.
144144
+
145-
This option bypasses the check, but instead requires that the
146-
current value of the ref to be the expected value. "git push"
147-
fails otherwise.
145+
This option overrides this restriction if the current value of the
146+
remote ref is the expected value. "git push" fails otherwise.
148147
+
149148
Imagine that you have to rebase what you have already published.
150149
You will have to bypass the "must fast-forward" rule in order to
@@ -156,15 +155,14 @@ commit, and blindly pushing with `--force` will lose her work.
156155
This option allows you to say that you expect the history you are
157156
updating is what you rebased and want to replace. If the remote ref
158157
still points at the commit you specified, you can be sure that no
159-
other people did anything to the ref (it is like taking a "lease" on
160-
the ref without explicitly locking it, and you update the ref while
161-
making sure that your earlier "lease" is still valid).
158+
other people did anything to the ref. It is like taking a "lease" on
159+
the ref without explicitly locking it, and the remote ref is updated
160+
only if the "lease" is still valid.
162161
+
163162
`--force-with-lease` alone, without specifying the details, will protect
164163
all remote refs that are going to be updated by requiring their
165164
current value to be the same as the remote-tracking branch we have
166-
for them, unless specified with a `--force-with-lease=<refname>:<expect>`
167-
option that explicitly states what the expected value is.
165+
for them.
168166
+
169167
`--force-with-lease=<refname>`, without specifying the expected value, will
170168
protect the named ref (alone), if it is going to be updated, by

0 commit comments

Comments
 (0)