All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] git-push.txt: clean up force-with-lease wording
@ 2015-03-26 15:15 Phil Hord
  2015-03-26 18:40 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Hord @ 2015-03-26 15:15 UTC (permalink / raw)
  To: git; +Cc: gitster, phil.hord, Phil Hord

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 <hordp@cisco.com>
---
 Documentation/git-push.txt | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 5171086..863c30c 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -157,9 +157,8 @@ already exists on the remote side.
 	Usually, "git push" refuses to update a remote ref that is
 	not an ancestor of the local ref used to overwrite it.
 +
-This option bypasses the check, but instead requires that the
-current value of the ref to be the expected value.  "git push"
-fails otherwise.
+This option overrides this restriction if the current value of the
+remote ref is the expected value.  "git push" fails otherwise.
 +
 Imagine that you have to rebase what you have already published.
 You will have to bypass the "must fast-forward" rule in order to
@@ -171,15 +170,14 @@ commit, and blindly pushing with `--force` will lose her work.
 This option allows you to say that you expect the history you are
 updating is what you rebased and want to replace. If the remote ref
 still points at the commit you specified, you can be sure that no
-other people did anything to the ref (it is like taking a "lease" on
-the ref without explicitly locking it, and you update the ref while
-making sure that your earlier "lease" is still valid).
+other people did anything to the ref. It is like taking a "lease" on
+the ref without explicitly locking it, and the remote ref is updated
+only if the "lease" is still valid.
 +
 `--force-with-lease` alone, without specifying the details, will protect
 all remote refs that are going to be updated by requiring their
 current value to be the same as the remote-tracking branch we have
-for them, unless specified with a `--force-with-lease=<refname>:<expect>`
-option that explicitly states what the expected value is.
+for them.
 +
 `--force-with-lease=<refname>`, without specifying the expected value, will
 protect the named ref (alone), if it is going to be updated, by
-- 
2.3.3.377.gdac1145

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] git-push.txt: clean up force-with-lease wording
  2015-03-26 15:15 [PATCH] git-push.txt: clean up force-with-lease wording Phil Hord
@ 2015-03-26 18:40 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2015-03-26 18:40 UTC (permalink / raw)
  To: Phil Hord; +Cc: git, phil.hord

Phil Hord <hordp@cisco.com> writes:

> 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 <hordp@cisco.com>
> ---

Thanks.  The updated text reads well.

Will queue.

>  Documentation/git-push.txt | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
> index 5171086..863c30c 100644
> --- a/Documentation/git-push.txt
> +++ b/Documentation/git-push.txt
> @@ -157,9 +157,8 @@ already exists on the remote side.
>  	Usually, "git push" refuses to update a remote ref that is
>  	not an ancestor of the local ref used to overwrite it.
>  +
> -This option bypasses the check, but instead requires that the
> -current value of the ref to be the expected value.  "git push"
> -fails otherwise.
> +This option overrides this restriction if the current value of the
> +remote ref is the expected value.  "git push" fails otherwise.
>  +
>  Imagine that you have to rebase what you have already published.
>  You will have to bypass the "must fast-forward" rule in order to
> @@ -171,15 +170,14 @@ commit, and blindly pushing with `--force` will lose her work.
>  This option allows you to say that you expect the history you are
>  updating is what you rebased and want to replace. If the remote ref
>  still points at the commit you specified, you can be sure that no
> -other people did anything to the ref (it is like taking a "lease" on
> -the ref without explicitly locking it, and you update the ref while
> -making sure that your earlier "lease" is still valid).
> +other people did anything to the ref. It is like taking a "lease" on
> +the ref without explicitly locking it, and the remote ref is updated
> +only if the "lease" is still valid.
>  +
>  `--force-with-lease` alone, without specifying the details, will protect
>  all remote refs that are going to be updated by requiring their
>  current value to be the same as the remote-tracking branch we have
> -for them, unless specified with a `--force-with-lease=<refname>:<expect>`
> -option that explicitly states what the expected value is.
> +for them.
>  +
>  `--force-with-lease=<refname>`, without specifying the expected value, will
>  protect the named ref (alone), if it is going to be updated, by

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-26 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-26 15:15 [PATCH] git-push.txt: clean up force-with-lease wording Phil Hord
2015-03-26 18:40 ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.