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

Re: [PATCH] help.c: strip suffix only if the STRIP_EXTENSION defined

From
Jeff King <peff@peff.net>
Date
Mar 16, 2016, 17:39 UTC
Message-ID
<20160316173941.GA9142@sigill.intra.peff.net>
In-Reply-To
<CANCZXo6KGtuuiZ3aha=Tqkwj3d8qytmA_rvw7fPHfevzz9Qyfg@mail.gmail.com>
On Wed, Mar 16, 2016 at 11:36:49PM +0600, Alexander Kuleshov wrote:
Show 5 quoted lines
> > I also wonder if this should be sharing the strip_extension() helper
> > added in your 63ca1c0.
> 
> Yes, I want to move strip_extension() (from 63ca1c0) to the git-compat-util.h
> and adapt/reuse it in the help.c. What do you think about this?

Naively, it sounds like a good idea to me, but I haven't looked too hard. There may be complications in the interface (it looks like the helper wants to make a new string, but one in help.c makes its own copy into the flex-array struct).

-Peff
Previous: Alexander Kuleshov
Message 6 of 6 in “help.c: strip suffix only if the STRIP_EXTENSION defined”
  1. help.c: strip suffix only if the STRIP_EXTENSION definedAlexander Kuleshov, Mar 16, 2016
  2. Duy NguyenMar 16, 2016
  3. Alexander KuleshovMar 16, 2016
  4. Jeff KingMar 16, 2016
  5. Alexander KuleshovMar 16, 2016
  6. Jeff KingMar 16, 2016

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.