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

Re: [PATCH] branch: make -v useful

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Jun 7, 2021, 18:00 UTC
Message-ID
<60be5eb6923de_39c0a20817@natae.notmuch>
In-Reply-To
<87h7i94ola.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason wrote:
> On Mon, Jun 07 2021, Felipe Contreras wrote:
> > Ævar Arnfjörð Bjarmason wrote:
Show 23 quoted lines
> >> 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.
Show 27 quoted lines
> >> 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.

Show 6 quoted lines
> 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
Previous: Ævar Arnfjörð BjarmasonNext: Felipe Contreras
Message 17 of 18 in “branch: make -v useful”
  1. branch: make -v usefulFelipe Contreras, Jun 5, 2021
  2. Ævar Arnfjörð BjarmasonJun 5, 2021
  3. Jeff KingJun 5, 2021
  4. Felipe ContrerasJun 7, 2021
  5. Jeff KingJun 8, 2021
  6. Felipe ContrerasJun 8, 2021
  7. Jeff KingJun 8, 2021
  8. Felipe ContrerasJun 8, 2021
  9. Kerry, RichardJun 8, 2021
  10. Felipe ContrerasJun 8, 2021
  11. Kerry, RichardJun 8, 2021
  12. Felipe ContrerasJun 10, 2021
  13. Kerry, RichardJun 25, 2021
  14. Felipe ContrerasJun 25, 2021
  15. Felipe ContrerasJun 7, 2021
  16. Ævar Arnfjörð BjarmasonJun 7, 2021
  17. Felipe ContrerasJun 7, 2021
  18. Felipe ContrerasJun 7, 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.