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

Re: [ANNOUNCE] GIT 1.5.4-rc3

From
Jeff King <peff@peff.net>
Date
Jan 12, 2008, 18:09 UTC
Message-ID
<20080112180943.GA32732@coredump.intra.peff.net>
In-Reply-To
<alpine.LSU.1.00.0801121756400.8333@wbgn129.biozentrum.uni-wuerzburg.de>
On Sat, Jan 12, 2008 at 05:57:49PM +0100, Johannes Schindelin wrote:
Show 9 quoted lines
> >  		if (pathspec) {
> > -			memset(seen, 0, argc);
> > +			memset(seen, 0, argc > 0 ? argc : 1);
> >  			matches = match_pathspec(pathspec, ent->name, ent->len,
> >  						 baselen, seen);
> >  		} else {
> 
> Would it not be better to guard the memset by an "if (argc)", and set 
> "seen" to NULL by default?

I am not sure what you mean by "guard with if (argc)"; it needs to be memset in either case (either with N slots, or with 1 if no argc). Seen could not be NULL previously, but Rene's patch makes that possible.

-Peff
Previous: Johannes SchindelinNext: Junio C Hamano
Message 15 of 29 in “[ANNOUNCE] GIT 1.5.4-rc3”
  1. Junio C HamanoJan 12, 2008
  2. Ismail DönmezJan 12, 2008
  3. Junio C HamanoJan 12, 2008
  4. Ismail DönmezJan 12, 2008
  5. Junio C HamanoJan 12, 2008
  6. Jeff KingJan 12, 2008
  7. Jeff KingJan 12, 2008
  8. valgrind test script integrationJeff King, Jan 12, 2008
  9. Jeff KingJan 12, 2008
  10. Johannes SchindelinJan 12, 2008
  11. Jeff KingJan 12, 2008
  12. René ScharfeJan 12, 2008
  13. Ismail DönmezJan 12, 2008
  14. Johannes SchindelinJan 12, 2008
  15. Jeff KingJan 12, 2008
  16. Junio C HamanoJan 12, 2008
  17. Roger C. SoaresJan 12, 2008
  18. Junio C HamanoJan 12, 2008
  19. [ANNOUNCE] GIT 1.5.4-rc4Junio C Hamano, Jan 21, 2008
  20. [ANNOUNCE] GIT 1.5.4-rc5Junio C Hamano, Jan 28, 2008
  21. Jeff KingJan 28, 2008
  22. Gustaf HendebyJan 29, 2008
  23. Junio C HamanoJan 29, 2008
  24. Jeff KingJan 29, 2008
  25. Steffen ProhaskaJan 29, 2008
  26. Steffen ProhaskaJan 13, 2008
  27. Steffen ProhaskaJan 21, 2008
  28. Johannes SchindelinJan 22, 2008
  29. Steffen ProhaskaJan 22, 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.