Re: Confusing git pull error message
- From
Jeff King <peff@peff.net>
- Date
- Sep 14, 2009, 11:14 UTC
- Message-ID
- <20090914111432.GA15893@sigill.intra.peff.net>
- In-Reply-To
- <7v1vmar353.fsf@alter.siamese.dyndns.org>
On Sun, Sep 13, 2009 at 01:38:48PM -0700, Junio C Hamano wrote:
Show 13 quoted lines
> I saw some discussion on improving the wording. Here is what I plan to
> commit.
>
> diff --git a/git-pull.sh b/git-pull.sh
> index 0bbd5bf..2c2fa79 100755
> --- a/git-pull.sh
> +++ b/git-pull.sh
> @@ -89,6 +89,8 @@ error_on_no_merge_candidates () {
> done
>
> curr_branch=${curr_branch#refs/heads/}
> + upstream=$(git config "branch.$curr_branch.merge" ||
> + git config "branch.$curr_branch.rebase")Argh, I made a mistake in my original patch which was retained in your version. For some reason I was thinking that "branch.*.rebase" was an _alternative_ to branch.*.merge, but it is in fact a bool that modifies how we interpret branch.*.merge (I think when the feature was originally discussed, that was one such proposal, and as I am not a user of the feature, I proceeded with a totally bogus mental model since then).
So this really should read simply:
upstream=$(git config "branch.$curr_branch.merge")
-Peff