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

[Patch 0/5] make more commands built-in

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jan 22, 2010, 16:22 UTC
Message-ID
<alpine.LFD.2.00.1001220804550.13231@localhost.localdomain>

Ok, so since I was working on this yesterday, I decided to just continue until I was done with all the trivial files.

This series makes five more commands built-in: 'merge-index', 'mktag', 'unpack-file', 'pack-redundant' and 'index-pack'. It further shrinks my git install footprint by about 20%:

	[torvalds@nehalem git]$ du -s /home/torvalds/libexec/git-core
	21424	/home/torvalds/libexec/git-core (before)
	16920	/home/torvalds/libexec/git-core (after)

and if we didn't default to having debug info enabled, it would look almost acceptable:

	[torvalds@nehalem git]$ du -s /home/torvalds/libexec/git-core
	5728	/home/torvalds/libexec/git-core (with "-g" removed)
	5108	/home/torvalds/libexec/git-core (with -Os and no debugging)

There still remains a few big git commands after this, but this takes care of most of the core ones.

All of these patches are trivial, the only one that has _any_ changes apart from the obvious builtin conversion is 'pack-redundant' which required some of the pack creation interfaces to now take 'const' index pathnames etc.

But as you can see, it removes more lines than it adds, and considering that yesterday the 'du' reported ~40MB of disk space for the git install, the shrinking certainly matters (of course, I suspect most distros wouldn't ship with debug info, so for most people it's about a few MB rather than a few tens of MB, but still).

		Linus
---
Linus Torvalds (5):
  make "merge-index" a built-in
  make "mktag" a built-in
  make "git unpack-file" a built-in
  make "git pack-redundant" a built-in
  make "index-pack" a built-in
 Makefile                                     |   10 +++++-----
 index-pack.c => builtin-index-pack.c         |   16 +++++++---------
 merge-index.c => builtin-merge-index.c       |    7 ++-----
 mktag.c => builtin-mktag.c                   |    6 +-----
 builtin-pack-objects.c                       |    5 +++--
 pack-redundant.c => builtin-pack-redundant.c |    8 ++------
 unpack-file.c => builtin-unpack-file.c       |    5 +----
 builtin.h                                    |    5 +++++
 git.c                                        |    5 +++++
 pack-write.c                                 |    4 ++--
 pack.h                                       |    2 +-
 11 files changed, 34 insertions(+), 39 deletions(-)
 rename index-pack.c => builtin-index-pack.c (98%)
 rename merge-index.c => builtin-merge-index.c (94%)
 rename mktag.c => builtin-mktag.c (98%)
 rename pack-redundant.c => builtin-pack-redundant.c (99%)
 rename unpack-file.c => builtin-unpack-file.c (89%)
Next: Linus Torvalds
Message 1 of 9 in “make more commands built-in”
  1. 0/5 make more commands built-inLinus Torvalds, Jan 22, 2010
  2. 1/5 make "merge-index" a built-inLinus Torvalds, Jan 22, 2010
  3. PATCH 2/5] make "mktag" a built-inLinus Torvalds, Jan 22, 2010
  4. 3/5 make "git unpack-file" a built-inLinus Torvalds, Jan 22, 2010
  5. 4/5 make "git pack-redundant" a built-inLinus Torvalds, Jan 22, 2010
  6. 5/5 make "index-pack" a built-inLinus Torvalds, Jan 22, 2010
  7. Junio C HamanoJan 22, 2010
  8. Linus TorvaldsJan 22, 2010
  9. Linus TorvaldsJan 22, 2010

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.