mbox series

[00/11] Unconvolutize push.default=simple

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

Message

Felipe Contreras May 28, 2021, 8:10 p.m. UTC
Tired of jumping through hoops trying to understand what the "simple"
mode does, I decided to reorganize it up for good so it's crystal
clear.

There are no functional changes.

Basically the simple mode pushes the current branch with the same name
on the remote.

Except... when there's no upstream branch configured with the same name.

Now the code and the documentation are clear.

This has the additional advantage of making `current` based on `simple`,
rather than the other way around; `current` is basically `simple`
but assuming we are never in a centralized workflow.

Felipe Contreras (11):
  push: hedge code of default=simple
  push: move code to setup_push_simple()
  push: reorganize setup_push_simple()
  push: simplify setup_push_simple()
  push: remove unused code in setup_push_upstream()
  push: merge current and simple
  push: remove redundant check
  push: fix Yoda condition
  push: remove trivial function
  push: flip !triangular for centralized
  doc: push: explain default=simple correctly

 Documentation/config/push.txt | 13 +++++-----
 builtin/push.c                | 47 +++++++++++++++++++----------------
 2 files changed, 31 insertions(+), 29 deletions(-)

Comments

Elijah Newren May 28, 2021, 9:17 p.m. UTC | #1
On Fri, May 28, 2021 at 1:10 PM Felipe Contreras
<felipe.contreras@gmail.com> wrote:

Is "Unconvolutize" a convoluted synonym of simplify, untwist, or
perhaps deconvolute?  ;-)

> Tired of jumping through hoops trying to understand what the "simple"
> mode does, I decided to reorganize it up for good so it's crystal
> clear.
>
> There are no functional changes.

A couple tweaks to some commit messages would make it easier to verify
that you have introduced no functional changes (at least for reviewers
like me who aren't that familiar with this code area).

> Basically the simple mode pushes the current branch with the same name
> on the remote.
>
> Except... when there's no upstream branch configured with the same name.
>
> Now the code and the documentation are clear.

I've read through the series and agree they do as you say.  The code
and documentation changes look good to me.

> This has the additional advantage of making `current` based on `simple`,
> rather than the other way around; `current` is basically `simple`
> but assuming we are never in a centralized workflow.
>
> Felipe Contreras (11):
>   push: hedge code of default=simple
>   push: move code to setup_push_simple()
>   push: reorganize setup_push_simple()
>   push: simplify setup_push_simple()
>   push: remove unused code in setup_push_upstream()
>   push: merge current and simple
>   push: remove redundant check
>   push: fix Yoda condition
>   push: remove trivial function
>   push: flip !triangular for centralized
>   doc: push: explain default=simple correctly
>
>  Documentation/config/push.txt | 13 +++++-----
>  builtin/push.c                | 47 +++++++++++++++++++----------------
>  2 files changed, 31 insertions(+), 29 deletions(-)
>
> --
> 2.32.0.rc0
Felipe Contreras May 28, 2021, 10:21 p.m. UTC | #2
Elijah Newren wrote:
> On Fri, May 28, 2021 at 1:10 PM Felipe Contreras
> <felipe.contreras@gmail.com> wrote:
> 
> Is "Unconvolutize" a convoluted synonym of simplify, untwist, or
> perhaps deconvolute?  ;-)

Indeed. Does it give you an urge to remedy that?

> > Tired of jumping through hoops trying to understand what the "simple"
> > mode does, I decided to reorganize it up for good so it's crystal
> > clear.
> >
> > There are no functional changes.
> 
> A couple tweaks to some commit messages would make it easier to verify
> that you have introduced no functional changes (at least for reviewers
> like me who aren't that familiar with this code area).

I'll wait a bit for futher comments and resend with those changes.

Cheers.
Elijah Newren May 28, 2021, 10:28 p.m. UTC | #3
On Fri, May 28, 2021 at 3:22 PM Felipe Contreras
<felipe.contreras@gmail.com> wrote:
>
> Elijah Newren wrote:
> > On Fri, May 28, 2021 at 1:10 PM Felipe Contreras
> > <felipe.contreras@gmail.com> wrote:
> >
> > Is "Unconvolutize" a convoluted synonym of simplify, untwist, or
> > perhaps deconvolute?  ;-)
>
> Indeed. Does it give you an urge to remedy that?

Nah, it's fine.