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

Re: [RFC] Instruct git-completion.bash that we are in test mode

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 21, 2013, 23:32 UTC
Message-ID
<7v7gn6f6ya.fsf@alter.siamese.dyndns.org>
In-Reply-To
<201301212330.10824.jn.avila@free.fr>
"Jean-Noël AVILA" <jn.avila@free.fr> writes:
> At least, "it works for me".

I suspect that your approach will still not fix the case in which you build a branch with a new command git-check-ignore, and then check out another branch that does not yet have that command without first running "make clean".

Does the following really pass with your patch?
	git checkout origin/next
        make
        git checkout origin/maint
	git apply your_patch.mbox
        make
        cd t && sh ./t9902-completion.sh
> +	__git_cmdlist () { git help -a| egrep -m 1 -B1000 PATH | egrep '^  [a-zA-Z0-9]'; }

'egrep' is not even in POSIX in the first place but grep -E ought to be a replacement for it, so I'll let it pass, but "-m1 -B1000"? Please stay within portable options.

    git help -a |
    sed -n -e '/^  [a-z]/p' -e '/^git commands available from elsewhere/q'/'

might be a good enough substitute, I think, if we were to take your approach, but I suspect it needs a lot more to limit the output in the test mode.

Previous: Jean-Noël AVILANext: Jeff King
Message 2 of 15 in “[RFC] Instruct git-completion.bash that we are in test mode”
  1. Jean-Noël AVILAJan 21, 2013
  2. Junio C HamanoJan 21, 2013
  3. Jeff KingJan 22, 2013
  4. Junio C HamanoJan 22, 2013
  5. Jean-Noël AvilaJan 22, 2013
  6. Junio C HamanoJan 22, 2013
  7. t9902: protect test from stray build artifactsJunio C Hamano, Jan 24, 2013
  8. Jeff KingJan 25, 2013
  9. Jonathan NiederJan 25, 2013
  10. Junio C HamanoJan 25, 2013
  11. Jeff KingJan 25, 2013
  12. Junio C HamanoJan 25, 2013
  13. Jeff KingJan 25, 2013
  14. Junio C HamanoJan 25, 2013
  15. Jeff KingJan 25, 2013

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.