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

[PATCH v3 0/5] Convert some stash functionality to a builtin

From
Joel Teichroeb <joel@teichroeb.net>
Date
Mar 27, 2018, 05:44 UTC
Message-ID
<20180327054432.26419-1-joel@teichroeb.net>

I've been working on converting all of git stash to be a builtin, however it's hard to get it all working at once with limited time, so I've moved around half of it to a new stash--helper builtin and called these functions from the shell script. Once this is stabalized, it should be easier to convert the rest of the commands one at a time without breaking anything.

I've sent most of this code before, but that was targetting a full replacement of stash. The code is overall the same, but with some code review changes and updates for internal api changes.

Since there seems to be interest from GSOC students who want to work on converting builtins, I figured I should finish what I have that works now so they could build on top of it.

Previous threads: v1: https://public-inbox.org/git/20180325173916.GE10909@hank/T/ v2: https://public-inbox.org/git/20180326011426.19159-1-joel@teichroeb.net/

Changes from v2:
 - Fixed formatting (I keep forgetting to set vim to tabs)
 - Renamed destroy to free
 - Redid my tests to validate more (Thanks Johannes)
 - Deleted more shell code that isn't needed anymore
Joel Teichroeb (5):
  stash: improve option parsing test coverage
  stash: convert apply to builtin
  stash: convert drop and clear to builtin
  stash: convert branch to builtin
  stash: convert pop to builtin
 .gitignore              |   1 +
 Makefile                |   1 +
 builtin.h               |   1 +
 builtin/stash--helper.c | 631 ++++++++++++++++++++++++++++++++++++++++++++++++
 git-stash.sh            | 136 +----------
 git.c                   |   1 +
 t/t3903-stash.sh        |  16 ++
 7 files changed, 659 insertions(+), 128 deletions(-)
 create mode 100644 builtin/stash--helper.c
-- 
2.16.2
Next: Joel Teichroeb
Message 1 of 10 in “Convert some stash functionality to a builtin”
  1. 0/5 Convert some stash functionality to a builtinJoel Teichroeb, Mar 27, 2018
  2. 1/5 stash: improve option parsing test coverageJoel Teichroeb, Mar 27, 2018
  3. 2/5 stash: convert apply to builtinJoel Teichroeb, Mar 27, 2018
  4. Johannes SchindelinMar 27, 2018
  5. Johannes SchindelinMar 27, 2018
  6. Joel TeichroebMar 27, 2018
  7. 3/5 stash: convert drop and clear to builtinJoel Teichroeb, Mar 27, 2018
  8. 4/5 stash: convert branch to builtinJoel Teichroeb, Mar 27, 2018
  9. 5/5 stash: convert pop to builtinJoel Teichroeb, Mar 27, 2018
  10. Johannes SchindelinMar 27, 2018

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.