From: "Shawn O. Pearce" <spearce@spearce.org>
To: Stephen Boyd <bebarino@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, Clemens Buchacher <drizzd@aon.at>,
Sverre Rabbelier <srabbelier@gmail.com>
Subject: Re: [PATCH/RFC 2/2] completion: allow use without compiling
Date: Tue, 27 Oct 2009 11:52:23 -0700 [thread overview]
Message-ID: <20091027185223.GH10505@spearce.org> (raw)
In-Reply-To: <1256589116-6998-3-git-send-email-bebarino@gmail.com>
Stephen Boyd <bebarino@gmail.com> wrote:
> 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.
next prev parent reply other threads:[~2009-10-27 18:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-26 20:31 [PATCH 0/2] pre-generated completion fix and RFC Stephen Boyd
2009-10-26 20:31 ` [PATCH 1/2] completion: ignore custom merge strategies when pre-generating Stephen Boyd
2009-10-26 20:31 ` [PATCH/RFC 2/2] completion: allow use without compiling Stephen Boyd
2009-10-26 23:59 ` Junio C Hamano
2009-10-27 0:33 ` Clemens Buchacher
2009-10-27 0:38 ` Junio C Hamano
2009-10-28 8:19 ` Clemens Buchacher
2009-10-27 2:49 ` Stephen Boyd
2009-10-27 18:52 ` Shawn O. Pearce [this message]
2009-10-28 1:43 ` Stephen Boyd
2009-10-28 7:18 ` Junio C Hamano
2009-10-28 7:29 ` Stephen Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091027185223.GH10505@spearce.org \
--to=spearce@spearce.org \
--cc=bebarino@gmail.com \
--cc=drizzd@aon.at \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=srabbelier@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).