git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "Jan Krüger" <jk@jk.gs>
Cc: Jan Nieuwenhuizen <janneke-list@xs4all.nl>,
	Tomas Carnecky <tom@dbservice.com>,
	git list <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] git-pull.sh: overhaul error handling when no candidates are found
Date: Thu, 12 Nov 2009 10:06:26 -0500	[thread overview]
Message-ID: <20091112150626.GA24848@coredump.intra.peff.net> (raw)
In-Reply-To: <20091112155310.7836c388@perceptron>

On Thu, Nov 12, 2009 at 03:53:10PM +0100, Jan Krüger wrote:

> * The longish error message displayed when the user uses "git pull" but
>   has no remote/merge/rebase lines configured for the current branch
>   contains example configuration to remedy the situation... but the
>   example uses a rather invalid syntax, using the dotted syntax "git
>   config" accepts, but also "=" separators which are used in the config
>   file format. It also implies that this syntax is valid in git config
>   files. This changes the example to use valid config file syntax.

Personally, I would go the other way: give them something they can cut
and paste on the command line, like:

  git config branch.${curr_branch}.merge ${upstream#refs/heads/}

> +	if [ true = "$rebase" ]; then
> +		op_type=rebase
> +		op_prep=against
> +	else
> +		op_type=merge
> +		op_prep=with
> +	fi
> +
>  	curr_branch=${curr_branch#refs/heads/}
> -	upstream=$(git config "branch.$curr_branch.merge")
> +	upstream=$(git config "branch.$curr_branch.$op_type")

Isn't branch.*.rebase a boolean value?

-Peff

  reply	other threads:[~2009-11-12 15:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11 13:22 Unhelpful "branch.master.remote = <nickname>" advice? Jan Nieuwenhuizen
2009-11-11 14:08 ` Tomas Carnecky
     [not found]   ` <1257965806.26362.132.camel@heerbeest>
2009-11-11 19:10     ` Tomas Carnecky
2009-11-11 19:34       ` Jan Nieuwenhuizen
2009-11-11 20:32         ` Tomas Carnecky
2009-11-12 14:17           ` Jan Nieuwenhuizen
2009-11-12 14:53             ` [PATCH] git-pull.sh: overhaul error handling when no candidates are found Jan Krüger
2009-11-12 15:06               ` Jeff King [this message]
2009-11-12 15:25                 ` Jan Krüger
2009-11-12 15:28                   ` Jeff King
2009-11-12 16:08                 ` [PATCH v2] git-pull.sh --rebase: " Jan Krüger
2009-11-13  4:07                   ` Jonathan Nieder
2009-11-27 14:17                     ` [PATCH] pull: clarify advice for the unconfigured error case Jonathan Nieder
2009-12-02 23:08                       ` Junio C Hamano
2009-12-03  1:26                         ` Jonathan Nieder
2009-12-03  1:43                           ` Jeff King
2009-12-03  8:49                             ` Jan Nieuwenhuizen
2009-12-03 10:51                         ` Jan Krüger
2009-12-07  0:29                           ` Junio C Hamano
2009-11-15  9:08                   ` [PATCH v2] git-pull.sh --rebase: overhaul error handling when no candidates are found Junio C Hamano
2009-11-12 14:56             ` Unhelpful "branch.master.remote = <nickname>" advice? Björn Steinbrink
2009-11-12 15:03             ` Tomas Carnecky
2009-11-18 12:29   ` [PATCH] Makefile: add uninstall target. Fixes elementary good cleaning manners Jan Nieuwenhuizen
2009-11-18 13:28     ` Matthieu Moy
2009-11-11 14:13 ` Unhelpful "branch.master.remote = <nickname>" advice? Jan Krüger
2009-11-11 19:54 ` Junio C Hamano

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

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

  git send-email \
    --in-reply-to=20091112150626.GA24848@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=janneke-list@xs4all.nl \
    --cc=jk@jk.gs \
    --cc=tom@dbservice.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.
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 NNTP newsgroup(s).