Re: [PATCH] git-pull.sh: overhaul error handling when no candidates are found

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]