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

Re: [PATCH 1/10] Teach git-completion.bash how to complete git-merge.

From
Junio C Hamano <junkio@cox.net>
Date
Nov 27, 2006, 19:12 UTC
Message-ID
<7vlklwhffb.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20061127084047.GA19745@spearce.org>
"Shawn O. Pearce" <spearce@spearce.org> writes:
Show 10 quoted lines
> +__git_merge_strategies ()
> +{
> +	sed -n "/^all_strategies='/{
> +		s/^all_strategies='//
> +		s/'//
> +		p
> +		q
> +		}" "$(git --exec-path)/git-merge"
> +}
> +

Shouldn't we load and compute this once and keep the result in a variable (say $__git_merge_strategies)?

Previous: Shawn O. PearceNext: Shawn Pearce
Message 2 of 3 in “Teach git-completion.bash how to complete git-merge.”
  1. 1/10 Teach git-completion.bash how to complete git-merge.Shawn O. Pearce, Nov 27, 2006
  2. Junio C HamanoNov 27, 2006
  3. Shawn PearceNov 27, 2006

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.