git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Jeff King <peff@peff.net>, Felipe Contreras <felipe.contreras@gmail.com>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH] branch: make -v useful
Date: Tue, 08 Jun 2021 02:17:43 -0500	[thread overview]
Message-ID: <60bf1997b1a72_1a2ac520865@natae.notmuch> (raw)
In-Reply-To: <YL8KiiGXF8LdGmQ2@coredump.intra.peff.net>

Jeff King wrote:
> On Mon, Jun 07, 2021 at 10:57:42AM -0500, Felipe Contreras wrote:
> > Jeff King wrote:
> > > On Sat, Jun 05, 2021 at 10:18:14PM +0200, Ævar Arnfjörð Bjarmason wrote:

> > > > As for the proposal, I don't use "branch -v" all that much much, so I
> > > > don't have strong knee-jerk feelings on it, but just considering it now
> > > > I'd think that the current default is a fundamentally better
> > > > approximation of what most users would like as a default.
> > > > 
> > > > I.e. I think it's fair to say that to the extent that most users have
> > > > topic branches they're part of some pull-request workflow where they're
> > > > always tracking the one upstream they always care about, usually
> > > > origin/master.
> > > 
> > > I'm in the same boat. I don't use "branch -v" either, but showing the
> > > upstream name wouldn't be at all helpful to me, since it they would all
> > > just be "origin/master".
> > 
> > But this patch is not for you, it's for the majority of git users.
> 
> In the quoted text above, Ævar mentioned that many users will have a
> pull-request workflow tracking one upstream.

A pull-request workflow tracks *two* upstreams.

Option 1: track the base:

  git checkout -b fix -t origin/master # like you, Ævar, and me

Option 2: track the branch you push to:

  git push --set-upstream github fix # like apparently most users

It's two different preferences for the same workflow.

> So no, I don't think it's just for me, but anybody with that workflow.
> 
> But of course i also mentioned other workflows, like...

No. The same workflow can have two very different upstreams.

> > > (This will vary based on workflow, but the
> > > other common workflow would probably just show "topic" being based on
> > > "origin/topic").
> > 
> > Based on what evidence?
> > 
> > As I showed in [1], all the top results when googling "upstream branch"
> > show the upstream branch being used in the opposite way: it's set to the
> > place you push to:
> > 
> >   git push --set-upstream @ github/my-pull-request
> 
> That's exactly what I was talking about in the quoted text above.  If
> you use --set-upstream, then your local "topic" will track something
> like "origin/topic".

But it's not origin/topic. I'm not talking about
`git branch --set-upstream-to`, I'm talking `git *push* --set-upstream`.

Git is a distributed VCS, most people don't have commit access to the
original repository, therefore they push to their personal repository
(e.g. github fork).

So their upstream is not origin/topic, it's github-personal-repo/topic.

> > But even if that was implemented, the whole point of this patch is about
> > what the default value of branch.verboseFormat should be.
> 
> I'm saying that I find your proposed value for that default to be
> useless, and I suspect many other users will, too.

Explain how.

If most people use `git push --set-upstream`, their upstream is most
definitely not origin/master (nor origin/topic).

Even git itself recommends setting the upstream to where they push to:

  fatal: The current branch fix has no upstream branch.
  To push the current branch and set the remote as upstream, use

      git push --set-upstream origin fix

So they will get a benefit from seeing the upstream in `git branch -v`.

Would they not?

> > Do I need to produce a list of the top 10 Google results of
> > "git branch -v" vs. "git branch -vv", to show that most people don't
> > find the output of -v useful?
> > 
> > Or what kind of evidence would satisfy you?
> 
> Don't bother on my account. I have generally found that going more than
> one round deep of discussion with you does not lead anywhere productive,
> and I don't intend to continue this thread.

If there's no evidence that will ever convince you otherwise, that means
you are not interested in actual real users, only in your idea of users.


For the people who are actually interested in what actual users do, I
ran a poll on reddit [1], and so far:

  15: The base branch (e.g. origin/master)
  15: The branch you push to (e.g. github/my-pull-request)

They are tied, 50% use the same upstream as you, 50% don't... For the
*same* workflow.

Cheers.

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

-- 
Felipe Contreras

  reply	other threads:[~2021-06-08  7:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-05  1:13 [PATCH] branch: make -v useful Felipe Contreras
2021-06-05 20:18 ` Ævar Arnfjörð Bjarmason
2021-06-05 22:35   ` Jeff King
2021-06-07 15:57     ` Felipe Contreras
2021-06-08  6:13       ` Jeff King
2021-06-08  7:17         ` Felipe Contreras [this message]
2021-06-08  7:27           ` Jeff King
2021-06-08  8:28             ` Felipe Contreras
2021-06-08  9:06           ` Kerry, Richard
2021-06-08  9:22             ` Felipe Contreras
2021-06-08 11:32               ` Kerry, Richard
2021-06-10  3:26                 ` Felipe Contreras
2021-06-25 15:03                   ` Kerry, Richard
2021-06-25 16:03                     ` Felipe Contreras
2021-06-07 15:28   ` Felipe Contreras
2021-06-07 16:05     ` Ævar Arnfjörð Bjarmason
2021-06-07 18:00       ` Felipe Contreras
2021-06-07 18:37       ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60bf1997b1a72_1a2ac520865@natae.notmuch \
    --to=felipe.contreras@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).