Re: [PATCH v2] remote: qualify "git pull" advice for non-upstream branches
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 19, 2026, 08:29 UTC
- Message-ID
- <xmqqbjeb7qfv.fsf@gitster.g>
- In-Reply-To
- <pull.2301.v2.git.git.1778665812261.gitgitgadget@gmail.com>
"Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> From: Harald Nordgren <haraldnordgren@gmail.com> > > When "git status" reports the local branch is behind the push > branch, the advice suggested a bare "git pull". That follows the > upstream, which may live on a different remote, so emit > "git pull <remote> <branch>" instead.
Hmph, shouldn't this be done conditionally, though? Most new users follow the recommended pattern to set branch.<name>.merge so that "git pull" would do the right thing for them, I presume, even when they are using triangular workflow to push to a different remote than the remote they pull from, so the new and more verbose message would not help the users any more than the existing message, right?
Can the code tell the situation where the extra part of the message would help and give it only then?