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

[PATCH 0/2] Port `git submodule init` from shell to C

From
Stefan Beller <sbeller@google.com>
Date
Apr 13, 2016, 00:18 UTC
Message-ID
<1460506710-23994-1-git-send-email-sbeller@google.com>

This is a resend of origin/sb/submodule-init (and it still applies on top of submodule-parallel-update)

I squashed a change which Michael Haggerty proposed in one of the large cleanup series preparing for the new refs backend. (18/21) As that is the only fix in that series touching submodules, picking it up here would untangle sb/submodule-init from that series.

Thanks, Stefan

diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index d942463..3078790 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -17,9 +17,8 @@ static char *get_default_remote(void)
 {
        char *dest = NULL, *ret;
        unsigned char sha1[20];
-       int flag = 0;
        struct strbuf sb = STRBUF_INIT;
-       const char *refname = resolve_ref_unsafe("HEAD", 0, sha1, &flag);
+       const char *refname = resolve_ref_unsafe("HEAD", 0, sha1, NULL);
 
        if (!refname)
                die(_("No such ref: %s"), "HEAD");


Stefan Beller (2):
  submodule: port resolve_relative_url from shell to C
  submodule: port init from shell to C

 builtin/submodule--helper.c | 316 +++++++++++++++++++++++++++++++++++++++++++-
 git-submodule.sh            | 118 +----------------
 submodule.c                 |  21 +++
 submodule.h                 |   1 +
 t/t0060-path-utils.sh       |  43 ++++++
 5 files changed, 384 insertions(+), 115 deletions(-)
-- 
2.5.0.264.gc776916.dirty
Next: Stefan Beller
Message 1 of 5 in “Port `git submodule init` from shell to C”
  1. 0/2 Port `git submodule init` from shell to CStefan Beller, Apr 13, 2016
  2. 1/2 submodule: port resolve_relative_url from shell to CStefan Beller, Apr 13, 2016
  3. 2/2 submodule: port init from shell to CStefan Beller, Apr 13, 2016
  4. Junio C HamanoApr 13, 2016
  5. Junio C HamanoApr 13, 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.