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

Re: [PATCH v2 1/4] completion: prioritize ./git-completion.bash

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jan 3, 2014, 22:55 UTC
Message-ID
<20140103225541.GG3338@vauxhall.crustytoothpaste.net>
In-Reply-To
<1388736031-6068-2-git-send-email-artagnon@gmail.com>
On Fri, Jan 03, 2014 at 01:30:28PM +0530, Ramkumar Ramachandra wrote:
Show 24 quoted lines
> To ease development, prioritize ./git-completion.bash over other
> standard system paths.
> 
> Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
> ---
>  contrib/completion/git-completion.zsh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
> index fac5e71..6fca145 100644
> --- a/contrib/completion/git-completion.zsh
> +++ b/contrib/completion/git-completion.zsh
> @@ -30,10 +30,10 @@ if [ -z "$script" ]; then
>  	local -a locations
>  	local e
>  	locations=(
> +		$(dirname ${funcsourcetrace[1]%:*})/git-completion.bash
>  		'/etc/bash_completion.d/git' # fedora, old debian
>  		'/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian
>  		'/usr/share/bash-completion/git' # gentoo
> -		$(dirname ${funcsourcetrace[1]%:*})/git-completion.bash
>  		)
>  	for e in $locations; do
>  		test -f $e && script="$e" && break

I'm not clear on this change. It looks like this loads git-completion.bash from the same directory as git-completion.zsh. Is this correct? Your commit message says "./", and if that's the case, it has the same security problems as putting "." first in your PATH.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Previous: Ramkumar RamachandraNext: Junio C Hamano
Message 3 of 8 in “Fix branch.autosetup(merge|rebase) completion”
  1. 0/4 Fix branch.autosetup(merge|rebase) completionRamkumar Ramachandra, Jan 3, 2014
  2. 1/4 completion: prioritize ./git-completion.bashRamkumar Ramachandra, Jan 3, 2014
  3. brian m. carlsonJan 3, 2014
  4. Junio C HamanoJan 3, 2014
  5. Ramkumar RamachandraJan 5, 2014
  6. 2/4 completion: introduce __gitcomp_2 ()Ramkumar Ramachandra, Jan 3, 2014
  7. 3/4 completion: fix branch.autosetup(merge|rebase)Ramkumar Ramachandra, Jan 3, 2014
  8. 4/4 completion: fix remote.pushdefaultRamkumar Ramachandra, Jan 3, 2014

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.