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

Re: [PATCH/RFC 2/2] completion: allow use without compiling

From
Shawn O. Pearce <spearce@spearce.org>
Date
Oct 27, 2009, 18:52 UTC
Message-ID
<20091027185223.GH10505@spearce.org>
In-Reply-To
<1256589116-6998-3-git-send-email-bebarino@gmail.com>
Stephen Boyd <bebarino@gmail.com> wrote:
Show 14 quoted lines
> Some users don't want to compile their completion, even when the build
> generated completion is 10x faster to load. For example, in my bashrc I
> source the completion script directly so I can stay up to date with the
> latest completion by merely pulling changes.
> 
> Do this by generating the lists dynamically when the merge strategy and
> command lists still have their initial values (__GIT_MERGE_STRATEGYLIST,
> __GIT_ALL_COMMANDLIST).
> 
> Signed-off-by: Stephen Boyd <bebarino@gmail.com>
> ---
> 
>  This duplicates code, but I don't know of a way to re-use the dynamic
>  code without sourcing a bash script and possibly breaking someone's build.

NAK on code duplication, especially this much. As Junio already pointed out in this thread we need an approach that doesn't cause this sort of redundant code.

I'm trying to catch up on email right now. I have no great suggestions on how to implement this to avoid the code duplication and still be able to support both compile-time and on-the-fly computation, but I do know I don't want this code twice.

-- 
Shawn.
Previous: Stephen BoydNext: Stephen Boyd
Message 9 of 12 in “pre-generated completion fix and RFC”
  1. 0/2 pre-generated completion fix and RFCStephen Boyd, Oct 26, 2009
  2. 1/2 completion: ignore custom merge strategies when pre-generatingStephen Boyd, Oct 26, 2009
  3. 2/2 completion: allow use without compilingStephen Boyd, Oct 26, 2009
  4. Junio C HamanoOct 26, 2009
  5. Clemens BuchacherOct 27, 2009
  6. Junio C HamanoOct 27, 2009
  7. Clemens BuchacherOct 28, 2009
  8. Stephen BoydOct 27, 2009
  9. Shawn O. PearceOct 27, 2009
  10. Stephen BoydOct 28, 2009
  11. Junio C HamanoOct 28, 2009
  12. Stephen BoydOct 28, 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.