diff mbox series

[11/11] doc: push: explain default=simple correctly

Message ID 20210528201014.2175179-12-felipe.contreras@gmail.com (mailing list archive)
State Superseded
Headers show
Series Unconvolutize push.default=simple | expand

Commit Message

Felipe Contreras May 28, 2021, 8:10 p.m. UTC
Now that the code has been unconvolutized and it's clear what it's
actually doing, update the documentation to reflect that.

Namely; the simple mode only barfs when working on a centralized
workflow, and there's no configured upstream branch with the same name.

Cc: Elijah Newren <newren@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/config/push.txt | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

Comments

Elijah Newren May 28, 2021, 9:07 p.m. UTC | #1
On Fri, May 28, 2021 at 1:10 PM Felipe Contreras
<felipe.contreras@gmail.com> wrote:
>
> Now that the code has been unconvolutized and it's clear what it's
> actually doing, update the documentation to reflect that.
>
> Namely; the simple mode only barfs when working on a centralized
> workflow, and there's no configured upstream branch with the same name.
>
> Cc: Elijah Newren <newren@gmail.com>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  Documentation/config/push.txt | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/Documentation/config/push.txt b/Documentation/config/push.txt
> index f2667b2689..632033638c 100644
> --- a/Documentation/config/push.txt
> +++ b/Documentation/config/push.txt
> @@ -24,15 +24,14 @@ push.default::
>
>  * `tracking` - This is a deprecated synonym for `upstream`.
>
> -* `simple` - in centralized workflow, work like `upstream` with an
> -  added safety to refuse to push if the upstream branch's name is
> -  different from the local one.
> +* `simple` - pushes the current branch with the same name on the remote.
>  +
> -When pushing to a remote that is different from the remote you normally
> -pull from, work as `current`.  This is the safest option and is suited
> -for beginners.
> +If you are working on a centralized workflow (pushing to the same repository you
> +pull from, which is typically `origin`), then you need to configure an upstream
> +branch with the same name.
>  +
> -This mode has become the default in Git 2.0.
> +This mode is the default since Git 2.0, and is the safest option suited for
> +beginners.
>
>  * `matching` - push all branches having the same name on both ends.
>    This makes the repository you are pushing to remember the set of
> --
> 2.32.0.rc0

Much clearer.  Well done.
Bagas Sanjaya May 29, 2021, 5:38 a.m. UTC | #2
On 29/05/21 03.10, Felipe Contreras wrote:
> diff --git a/Documentation/config/push.txt b/Documentation/config/push.txt
> index f2667b2689..632033638c 100644
> --- a/Documentation/config/push.txt
> +++ b/Documentation/config/push.txt
> @@ -24,15 +24,14 @@ push.default::
>   
>   * `tracking` - This is a deprecated synonym for `upstream`.
>   
> -* `simple` - in centralized workflow, work like `upstream` with an
> -  added safety to refuse to push if the upstream branch's name is
> -  different from the local one.
> +* `simple` - pushes the current branch with the same name on the remote.
>   +
> -When pushing to a remote that is different from the remote you normally
> -pull from, work as `current`.  This is the safest option and is suited
> -for beginners.
> +If you are working on a centralized workflow (pushing to the same repository you
> +pull from, which is typically `origin`), then you need to configure an upstream
> +branch with the same name.
>   +
> -This mode has become the default in Git 2.0.
> +This mode is the default since Git 2.0, and is the safest option suited for
> +beginners.
>   
>   * `matching` - push all branches having the same name on both ends.
>     This makes the repository you are pushing to remember the set of
> 

Grammar looks OK.

Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
diff mbox series

Patch

diff --git a/Documentation/config/push.txt b/Documentation/config/push.txt
index f2667b2689..632033638c 100644
--- a/Documentation/config/push.txt
+++ b/Documentation/config/push.txt
@@ -24,15 +24,14 @@  push.default::
 
 * `tracking` - This is a deprecated synonym for `upstream`.
 
-* `simple` - in centralized workflow, work like `upstream` with an
-  added safety to refuse to push if the upstream branch's name is
-  different from the local one.
+* `simple` - pushes the current branch with the same name on the remote.
 +
-When pushing to a remote that is different from the remote you normally
-pull from, work as `current`.  This is the safest option and is suited
-for beginners.
+If you are working on a centralized workflow (pushing to the same repository you
+pull from, which is typically `origin`), then you need to configure an upstream
+branch with the same name.
 +
-This mode has become the default in Git 2.0.
+This mode is the default since Git 2.0, and is the safest option suited for
+beginners.
 
 * `matching` - push all branches having the same name on both ends.
   This makes the repository you are pushing to remember the set of