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

(anal) Q: Are there any coding styles or development guidelines?

From
KSKlaus Robert Suetterlin <robert@mpe.mpg.de>
Date
Apr 22, 2005, 15:58 UTC
Message-ID
<20050422155845.GC52771@xdt04.mpe-garching.mpg.de>
In-Reply-To
<Pine.LNX.4.58.0504220838340.2344@ppc970.osdl.org>

I'm currently doing a source audit of the git core components. Mainly I want to check if I can spot some left over memory leaks.

Unfortunately ;) I didn't find any so far (after reading five files).

Still I did find quite a lot of stuff that lint would most likely complain about. Like not checking return values. Should this be fixed now or isn't it time to do the cleanup, yet?

I also found several literal copies of the same function including function name, parameter list, etc. Wouldn't it be better do clean those up and put them in a utility.{c,h} file? A similar problem is the continous reimplementation of linked lists, dynamic memory, smart strings / vectors, etc. And then there are some stale files (i.e. revision.*) that the Changelog already mentions as removed, but which are still active in HEAD.

I am a little reluctant to do the work, as the code still changes so fast I do not really know if code I fix will still be there tomorrow.

Also I do not know if there is any notion of coding style published somewhere. I only noticed, that the code does not look like anything I'd have written and seems to follow some general principle.

Kind regards,

--Robert Suetterlin (robert@mpe.mpg.de) phone: (+49)89 / 30000-3546 fax: (+49)89 / 30000-3950

Previous: Linus TorvaldsNext: Linus Torvalds
Message 11 of 13 in “use gcrypt instead of libssl for hash”
  1. use gcrypt instead of libssl for hashJunichi Uekawa, Apr 17, 2005
  2. Linus TorvaldsApr 17, 2005
  3. Junichi UekawaApr 17, 2005
  4. Edgar ToernigApr 18, 2005
  5. Mozilla SHA1 implementationLinus Torvalds, Apr 21, 2005
  6. Edgar ToernigApr 21, 2005
  7. Paul MackerrasApr 22, 2005
  8. Paul MackerrasApr 22, 2005
  9. Linus TorvaldsApr 22, 2005
  10. Linus TorvaldsApr 22, 2005
  11. (anal) Q: Are there any coding styles or development guidelines?Klaus Robert Suetterlin, Apr 22, 2005
  12. Linus TorvaldsApr 22, 2005
  13. Daniel BarkalowApr 22, 2005

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.