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

Re: [PATCH] git grep: Add "-Z/--null" option as in GNU's grep.

From
Pierre Habouzit <madcoder@debian.org>
Date
Oct 1, 2008, 06:12 UTC
Message-ID
<20081001061249.GC22363@artemis.corp>
In-Reply-To
<1222816390-9141-1-git-send-email-killekulla@rdrz.de>
On Tue, Sep 30, 2008 at 11:13:10PM +0000, Raphael Zimmerer wrote:
> +	printf("%s%c", name, opt->null_following_name ? 0 : '\n');

I know I'm nitpicking and I don't know what the git custom on this really is, but I tend to prefer '\0' when in the context of a char. There is no confusion here of course, but I believe it to be a sane habit. (In the same vein that it's ugly to use 0 for NULL ;p).

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org
Previous: Raphael ZimmererNext: Shawn O. Pearce
Message 8 of 11 in “git grep: Add "-Z/--null" option as in GNU's grep.”
  1. git grep: Add "-Z/--null" option as in GNU's grep.Raphael Zimmerer, Sep 30, 2008
  2. Shawn O. PearceSep 30, 2008
  3. Raphael ZimmererSep 30, 2008
  4. Johannes SchindelinOct 1, 2008
  5. Raphael ZimmererOct 1, 2008
  6. Shawn O. PearceOct 1, 2008
  7. Raphael ZimmererOct 1, 2008
  8. Pierre HabouzitOct 1, 2008
  9. Shawn O. PearceOct 1, 2008
  10. git grep: Add "-z/--null" option as in GNU's grep.Raphael Zimmerer, Oct 1, 2008
  11. Shawn O. PearceOct 1, 2008

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.