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

Re: [PATCH v3] commit -v: strip diffs and submodule shortlogs from the commit message

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 21, 2013, 22:23 UTC
Message-ID
<xmqqsiup2y3u.fsf@gitster.dls.corp.google.com>
In-Reply-To
<528E7A6E.8080603@web.de>
Jens Lehmann <Jens.Lehmann@web.de> writes:
Show 10 quoted lines
> But what about this:
>
> 	struct strbuf cut_line = STRBUF_INIT;
> 	strbuf_addf(&cut_line, "%c %s", comment_line_char, wt_status_cut_line);
> 	p = strstr(buf->buf, cut_line.buf);
> 	if (p && (p == buf->buf || p[-1] == '\n'))
> 		strbuf_setlen(buf, p - buf->buf);
> 	strbuf_release(&cut_line);
>
> That is shorter can easily be adapted to a comment line string later.
Sure, that would work fine.
Thanks.
Previous: Jens LehmannNext: Jens Lehmann
Message 4 of 7 in “commit -v: strip diffs and submodule shortlogs from the commit message”
  1. commit -v: strip diffs and submodule shortlogs from the commit messageJens Lehmann, Nov 20, 2013
  2. Junio C HamanoNov 20, 2013
  3. Jens LehmannNov 21, 2013
  4. Junio C HamanoNov 21, 2013
  5. commit -v: strip diffs and submodule shortlogs from the commit messageJens Lehmann, Dec 5, 2013
  6. Junio C HamanoDec 5, 2013
  7. Junio C HamanoDec 5, 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.