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

Re: [PATCH 2/4] This exports the update() function from builtin-add.c as

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 27, 2007, 19:50 UTC
Message-ID
<7vlkarubv2.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<Pine.LNX.4.64.0709271245570.28395@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 7 quoted lines
> On Thu, 27 Sep 2007, Kristian Høgsberg wrote:
>
>>  builtin-add.c |    8 ++++----
>>  commit.h      |    2 ++
>
> Maybe move it to read-cache.c, just after "add_file_to_index()"?  And 
> expose it via cache.h, not commit.h?

Hmmmmmmmm. read-cache.c has been one of the lowest level files that define atomic operations, similar to sha1_file.c, and this function is much more porcelain-ish molecule operation. I'd rather not.

What other useful molecules would we have and/or need to have by splitting existing standalone commands? rerere() is another, and probably we would need to rip the --with-tree bit from ls-files out to make it usable from builtin-commit.

I do not think we would want to go to the "one file per function" extreme, either. Can we have a new file that hold these helper functions for porcelains?

Previous: Johannes SchindelinNext: Jonas Fonseca
Message 8 of 17 in “Add a simple option parser for use by builtin-commit.c.”
  1. 1/4 Add a simple option parser for use by builtin-commit.c.Kristian Høgsberg, Sep 27, 2007
  2. 2/4 This exports the update() function from builtin-add.c asKristian Høgsberg, Sep 27, 2007
  3. 3/4 Implement git commit as a builtin command.Kristian Høgsberg, Sep 27, 2007
  4. 4/4 Move launch_editor() and stripspace() to new file editor.c.Kristian Høgsberg, Sep 27, 2007
  5. Junio C HamanoSep 27, 2007
  6. Kristian HøgsbergOct 3, 2007
  7. Johannes SchindelinSep 27, 2007
  8. Junio C HamanoSep 27, 2007
  9. Jonas FonsecaSep 30, 2007
  10. Johannes SchindelinOct 1, 2007
  11. Jonas FonsecaOct 1, 2007
  12. Johannes SchindelinOct 1, 2007
  13. Jeff KingOct 1, 2007
  14. Kristian HøgsbergOct 1, 2007
  15. Johannes SchindelinOct 1, 2007
  16. Jonas FonsecaOct 3, 2007
  17. Kristian HøgsbergOct 3, 2007

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.