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

Re: [PATCH] bisect: remove Perl use by implementing "git bisect--helper --sq-quote"

From
Christian Couder <chriscool@tuxfamily.org>
Date
Apr 23, 2009, 19:20 UTC
Message-ID
<200904232120.01300.chriscool@tuxfamily.org>
In-Reply-To
<7veivl444b.fsf@gitster.siamese.dyndns.org>
Le mercredi 22 avril 2009, Junio C Hamano a écrit :
Show 8 quoted lines
> Christian Couder <chriscool@tuxfamily.org> writes:
> > The sq() function in "git-bisect.sh" was the only place where Perl
> > was needed. This patch remove this use of Perl by implementing
> > a new "--sq-quote" option in "builtin-bisect--helper.c".
>
> Isn't it because only git-bisect.sh for whatever reason reimplements sq
> using Perl while original implementation in am used sed for more
> portability?

Well I saw that there was some work going to remove perl dependencies, so I thought that I might help by removing the Perl dependency from git-bisect.sh.

I didn't look at other places where sq is implemented otherwise. I just checked other shell scripts where there is @@PERL@@.

Show 6 quoted lines
> I would suspect, if it were 3 years ago, that any serious porcelain
> writers would have very much appreciated such a feature that gives shell
> programmers an easy access to a quoting function that allows a safe eval,
> and I would have strongly suggested that the feature to be implemented in
> a more permanent place rather than in bisect--helper; perhaps a better
> place would be the kitchen-sink "rev-parse".

I did it in bisect--helper because I was working on it, and I wanted to do it in C because I am porting bisect stuff to C.

But now that you pointed that sq is also implemented in git-am.sh, I agree that it would be perhaps better if it was implemented in something like "rev-parse". And then it could be used both in "git-bisect.sh" and in "git-am.sh".

> But given that nobody seems competent enough to do serious programming in
> shell these days, I am not sure if the choice between bisect--helper and
> rev-parse makes much of a difference ;-).
We never know, it might become trendy again ;-)

Best regards, Christian.

Previous: Junio C Hamano
Message 3 of 3 in “bisect: remove Perl use by implementing "git bisect--helper --sq-quote"”
  1. bisect: remove Perl use by implementing "git bisect--helper --sq-quote"Christian Couder, Apr 22, 2009
  2. Junio C HamanoApr 22, 2009
  3. Christian CouderApr 23, 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.