git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jeff King <peff@peff.net>
Date
Nov 12, 2009, 15:06 UTC
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:
Show 7 quoted lines
> * 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/}
Show 11 quoted lines
> +	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
Previous: Jan KrügerNext: Jan Krüger
Message 12 of 26 in “Unhelpful "branch.master.remote = <nickname>" advice?”
  1. Jan NieuwenhuizenNov 11, 2009
  2. Tomas CarneckyNov 11, 2009
  3. Makefile: add uninstall target. Fixes elementary good cleaning manners.Jan Nieuwenhuizen, Nov 18, 2009
  4. Matthieu MoyNov 18, 2009
  5. Jan KrügerNov 11, 2009
  6. Junio C HamanoNov 11, 2009
  7. Tomas CarneckyNov 11, 2009
  8. Jan NieuwenhuizenNov 11, 2009
  9. Tomas CarneckyNov 11, 2009
  10. Jan NieuwenhuizenNov 12, 2009
  11. git-pull.sh: overhaul error handling when no candidates are foundJan Krüger, Nov 12, 2009
  12. Jeff KingNov 12, 2009
  13. Jan KrügerNov 12, 2009
  14. Jeff KingNov 12, 2009
  15. git-pull.sh --rebase: overhaul error handling when no candidates are foundJan Krüger, Nov 12, 2009
  16. Jonathan NiederNov 13, 2009
  17. pull: clarify advice for the unconfigured error caseJonathan Nieder, Nov 27, 2009
  18. Junio C HamanoDec 2, 2009
  19. Jonathan NiederDec 3, 2009
  20. Jeff KingDec 3, 2009
  21. Jan NieuwenhuizenDec 3, 2009
  22. Jan KrügerDec 3, 2009
  23. Junio C HamanoDec 7, 2009
  24. Junio C HamanoNov 15, 2009
  25. Björn SteinbrinkNov 12, 2009
  26. Tomas CarneckyNov 12, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.