git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sergey Organov <sorganov@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: Minor(?) usability issue with branch.<name>.pushRemote
Date: Wed, 12 Dec 2018 14:18:13 +0300	[thread overview]
Message-ID: <87d0q72du2.fsf@javad.com> (raw)
In-Reply-To: <xmqqh8fjhy8k.fsf@gitster-ct.c.googlers.com> (Junio C. Hamano's message of "Wed, 12 Dec 2018 18:48:27 +0900")

Junio C Hamano <gitster@pobox.com> writes:

> Sergey Organov <sorganov@gmail.com> writes:
>
>> So, finally, it's 'branch.linux.pushremote' that is the "offender".
>>
>> Looks like both 'git status' and 'git branch -vv' should somehow learn
>> about 'branch.<name>.pushremote' feature so that their
>> output/suggestions make more sense?
>
> Doesn't "ahead of X by N" mean "you forked from X and built N commits
> on top", not "you have N commits that is not in X which is where you
> would push to"?

Sure, but the problem is that 'git status' gives exact suggestion:

 (use "git push" to publish your local commits)

that is somewhat misleading in this particular case ('git push' is now a
no-op), and then 'git branch -vv', while tells me relationship to
"upstream", keeps silence about non-matching push destination.

To add even more complexity to the case, notice that the first time
after I committed locally, the invocation of 'git push' (exactly as
suggested by 'git status') did successfully push those two commits, so
the suggestion is exactly right before the commits are pushed, yet
is rather misleading afterwards.

-- 
Sergey

      reply	other threads:[~2018-12-12 11:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12  7:15 Minor(?) usability issue with branch.<name>.pushRemote Sergey Organov
2018-12-12  9:48 ` Junio C Hamano
2018-12-12 11:18   ` Sergey Organov [this message]

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=87d0q72du2.fsf@javad.com \
    --to=sorganov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).