From: Jeff King Date: Thu, 12 Nov 2009 15:06:26 GMT Subject: Re: [PATCH] git-pull.sh: overhaul error handling when no candidates are found Message-ID: <20091112150626.GA24848@coredump.intra.peff.net> 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