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

[RFC] Code reorgnization

From
Duy Nguyen <pclouds@gmail.com>
Date
Mar 17, 2016, 11:11 UTC
Message-ID
<20160317111136.GA21745@lanh>

Git's top directory is crowded and I think it's agreed that moving test-* to t/helper is a good move. I just wanted to check if we could take this opportunity (after v2.8.0) to move some other files too. I propose the following new subdirs

lib --- This contains files that are about data structures or algorithms. Very general purpose. This directory includes

argv-array.[ch] base85.c column.[ch] delta.h diff-delta.c hashmap.[ch] hex.c khash.h kwset.[ch] levenshtein.[ch] mergesort.[ch] patch-delta.c prio-queue.[ch] sha1-array.[ch] sha1-lookup.[ch] strbuf.[ch] string-list.[ch] url.[ch] urlmatch.[ch] utf8.[ch] varint.[ch] versioncmp.c wildmatch.[ch]

odb --- The grouping of object database files is to easily make connections between them. Unlike, for example, diff-related files which either start with "diff" or has that word in the file name to make connections.

alloc.c blob.[ch] bulk-checkin.[ch] commit-slab.h commit.[ch] object.[ch] pack.h pack-revindex.[ch] replace_object.c sha1_file.c streaming.[ch] tag.[ch] tree.[ch]

index ----- For the same reason of odb subdir. This directory contains

cache-tree.[ch] name-hash.c preload-index.c read-cache.c split-index.[ch] unpack-trees.[ch]

sys (or maybe util or support) ------------------------------ These are still general purpose but is usually system-related. They are still far away from git's core logic. I want to separate them to make it easier to spot "important" files at top dir.

abspath.c color.[ch] copy.c csum-file.[ch] ctype.c date.c editor.c exec_cmd.[ch] gettext.[ch] gettext.h gpg-interface.[ch] ident.c lockfile.[ch] mailinfo.[ch] mailmap.[ch] pager.c parse-options-cb.c parse-options.[ch] pathspec.[ch] pkt-line.[ch] progress.[ch] prompt.[ch] quote.[ch] run-command.[ch] sideband.[ch] sigchain.[ch] symlinks.c tar.h tempfile.[ch] thread-utils.[ch] trace.[ch] unix-socket.[ch] usage.c userdiff.[ch] wrapper.c write_or_die.c zlib.c

Good? Bad? Ugly? -- Duy

Next: Johannes Schindelin
Message 1 of 14 in “[RFC] Code reorgnization”
  1. Duy NguyenMar 17, 2016
  2. Johannes SchindelinMar 17, 2016
  3. Duy NguyenMar 17, 2016
  4. Junio C HamanoMar 17, 2016
  5. Thomas AdamMar 17, 2016
  6. Junio C HamanoMar 17, 2016
  7. Stefan BellerMar 17, 2016
  8. Junio C HamanoMar 17, 2016
  9. Pranit BauvaMar 17, 2016
  10. John KeepingMar 17, 2016
  11. Junio C HamanoMar 17, 2016
  12. Duy NguyenMar 18, 2016
  13. Jeff KingMar 18, 2016
  14. Duy NguyenMar 18, 2016

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.