git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Elijah Newren <newren@gmail.com>
Date
May 28, 2021, 21:07 UTC
Message-ID
<CABPp-BFsugBhk8-jkCpruFqn2W0aVjbyALwQgBYj56X9cf9vMw@mail.gmail.com>
In-Reply-To
<20210528201014.2175179-12-felipe.contreras@gmail.com>

On Fri, May 28, 2021 at 1:10 PM Felipe Contreras <felipe.contreras@gmail.com> wrote:

Show 41 quoted lines
>
> 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.
Previous: Felipe ContrerasNext: Bagas Sanjaya
Message 17 of 24 in “Unconvolutize push.default=simple”
  1. 00/11 Unconvolutize push.default=simpleFelipe Contreras, May 28, 2021
  2. 01/11 push: hedge code of default=simpleFelipe Contreras, May 28, 2021
  3. 02/11 push: move code to setup_push_simple()Felipe Contreras, May 28, 2021
  4. 03/11 push: reorganize setup_push_simple()Felipe Contreras, May 28, 2021
  5. Elijah NewrenMay 28, 2021
  6. Felipe ContrerasMay 28, 2021
  7. Elijah NewrenMay 28, 2021
  8. 04/11 push: simplify setup_push_simple()Felipe Contreras, May 28, 2021
  9. Elijah NewrenMay 28, 2021
  10. Felipe ContrerasMay 28, 2021
  11. 05/11 push: remove unused code in setup_push_upstream()Felipe Contreras, May 28, 2021
  12. 06/11 push: merge current and simpleFelipe Contreras, May 28, 2021
  13. 07/11 push: remove redundant checkFelipe Contreras, May 28, 2021
  14. 08/11 push: fix Yoda conditionFelipe Contreras, May 28, 2021
  15. 09/11 push: remove trivial functionFelipe Contreras, May 28, 2021
  16. 11/11 doc: push: explain default=simple correctlyFelipe Contreras, May 28, 2021
  17. Elijah NewrenMay 28, 2021
  18. Bagas SanjayaMay 29, 2021
  19. 10/11 push: flip !triangular for centralizedFelipe Contreras, May 28, 2021
  20. Elijah NewrenMay 28, 2021
  21. Felipe ContrerasMay 28, 2021
  22. Elijah NewrenMay 28, 2021
  23. Felipe ContrerasMay 28, 2021
  24. Elijah NewrenMay 28, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.