Re: [PATCH] branch: make -v useful

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason wrote:
> On Mon, Jun 07 2021, Felipe Contreras wrote:
> > Ævar Arnfjörð Bjarmason wrote:

> >> Disambiguating that is one of the reasons we prefix with the remote
> >> name, but I'd say it makes for a confusing example in a commit message,
> >> and also if instead of saying:
> >> 
> >>     branch: make -v useful
> >> 
> >> It said e.g.:
> >> 
> >>     branch: reverse the priority of what -v and -vv show
> >
> > I guess that depends on what you consider this patch is doing, why, and how.
> >
> > But I have no problem with your version.
> >
> >> Or something similar to note that it's not "useful" now, but an
> >> opinionated change about what we should show on verbosity level 1 and 2.
> >
> > I'm not sure I parsed that correctly, but that's the whole point:
> > verbosity level 1 is not very useful (I'd argue not useful at all).
> 
> Maybe, anyway I meant to suggest saying something approaching "reverse
> the order of the data we consider important" instead of the equivalent
> of "make the data useful".

All right, that transmits the message I want to transmit and is less
abrasive, so that's good.

I've updated the title, and in fact changed the whole commit message.

> >> Whereas you are presumably tracking origin/master for some, building on
> >> your own topic (or other people's topics) for another etc., I think that
> >> workflow is much rarer outside of linux.git and git.git, and even for
> >> those most people usually track origin/master with most of their topics.
> >
> > That's an unsupported assumption.
> >
> > As I showed above, most pople track the branch they push to, not
> > origin/master.
> >
> > Google "git branch -v", and you will find mostly official documentation
> > and man pages.
> >
> > Google "git branch -vv", and you will find mostly blog posts, Stack
> > Overflow questions, and cheat sheets.
> >
> > I think the reason why is obvious.
> 
> Yes, I stand corrected.
> 
> For what it's worth I think one thing to salvage from my ill-informed
> rambling is that I was under that impression because I set
> push.default=upstream.
> 
> But yes, with "simple" being the default and refusing to have
> avar/my-topic have an upstream of origin/master my setup is probably not
> the common case.

This is one of the reasons I force myself to have a .gitconfig as clean
as possible; to try to emulate as much as possible the experience of the
typical git user.

Having used push.default=simple for many years now, I find it very
suboptimal. Basically I can't trust git to do the right thing, and I
always specify what to push.

I suspect this is what most users do (unless they have setup upstream
like `git push -u`).

For what it's worth, when there's a difference of opinion in the mailing
list sometimes I create polls in reddit to see what the users think, and
I did for this one:

https://www.reddit.com/r/git/comments/nuf3p5/where_do_you_point_your_upstream_branch_to/

At the moment 13 people say they use origin/master, 11 repo/branch, and
11 say they it's the same thing in their case (e.g. origin/dev).
8 people don't know what an upstream branch is.

> I wonder if this should depend on the setting of push.default, or
> whether we can infer anything at all from that setting. After all you
> can set it to whatever and then either manually do "git push <remote>
> <src>:<dst>" (my usual worklow is just "git push origin HEAD"), or
> manually do the "git rebase origin/master" or whatever in the case where
> your upstream is your own topic branch.

I do have a much better solution that makes everything work for all
configurations, but the patches are not ready yet, and I'm certain will
receive pushback, just like the last time I sent it.

This is the first patch, which I don't think has anything to do with
the rest of the patches, and can very well stand on its own.

Cheers.

-- 
Felipe Contreras



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux