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

Re: [PATCH v2] branch: colour upstream branches

From
Jeff King <peff@peff.net>
Date
Apr 15, 2013, 00:47 UTC
Message-ID
<20130415004746.GA6477@sigill.intra.peff.net>
In-Reply-To
<1365982707-25455-1-git-send-email-felipe.contreras@gmail.com>
On Sun, Apr 14, 2013 at 06:38:27PM -0500, Felipe Contreras wrote:
Show 6 quoted lines
> +		if (want_color(branch_use_color))
> +			snprintf(fancy, sizeof(fancy), "%s%s%s",
> +					branch_get_color(BRANCH_COLOR_UPSTREAM),
> +					ref, branch_get_color(BRANCH_COLOR_RESET));
> +		else
> +			strncpy(fancy, ref, sizeof(fancy));
  $ man strncpy | grep -C1 Warning
  The strncpy() function is similar, except that at most n bytes of src are
  copied.  Warning: If there is no null byte among the first n bytes of src,
  the string placed in dest will not be null-terminated.
-Peff
Previous: Felipe ContrerasNext: Junio C Hamano
Message 2 of 4 in “branch: colour upstream branches”
  1. branch: colour upstream branchesFelipe Contreras, Apr 14, 2013
  2. Jeff KingApr 15, 2013
  3. Junio C HamanoApr 15, 2013
  4. Felipe ContrerasApr 15, 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.