list mirror (unofficial, one of many)
 help / color / Atom feed
From: Stefan Beller <>
	Stefan Beller <>
Subject: [PATCH 2/6] rename unused variables
Date: Wed, 18 Jul 2018 12:48:49 -0700
Message-ID: <> (raw)
In-Reply-To: <>

The 'mode' variable is not used in cmd_update for its original purpose,
rename it to 'dummy' as it only serves the purpose to abort quickly
documenting this knowledge.

The variable 'stage' is also not used any more in cmd_update, so remove it.

This went unnoticed as first each function used the commonly used
submodule listing, which was converted in 74703a1e4df (submodule: rewrite
`module_list` shell function in C, 2015-09-02). When cmd_update was
using its own function starting in 48308681b07 (git submodule update:
have a dedicated helper for cloning, 2016-02-29), its removal was missed.

A later patch in this series also touches the communication between
the submodule helper and, but let's have this as
a preparatory patch, as it eases the next patch, which stores the
raw data instead of the line printed for this communication.

Signed-off-by: Stefan Beller <>
 builtin/submodule--helper.c | 5 ++---            | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 20ae9191ca3..ebcfe85bfa9 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1571,9 +1571,8 @@ static int prepare_to_clone_next_submodule(const struct cache_entry *ce,
 	needs_cloning = !file_exists(sb.buf);
-	strbuf_addf(&sb, "%06o %s %d %d\t%s\n", ce->ce_mode,
-			oid_to_hex(&ce->oid), ce_stage(ce),
-			needs_cloning, ce->name);
+	strbuf_addf(&sb, "dummy %s %d\t%s\n",
+		    oid_to_hex(&ce->oid), needs_cloning, ce->name);
 	string_list_append(&suc->projectlines, sb.buf);
 	if (!needs_cloning)
diff --git a/ b/
index 8a611865397..56588aa304d 100755
--- a/
+++ b/
@@ -531,9 +531,9 @@ cmd_update()
 		"$@" || echo "#unmatched" $?
 	} | {
-	while read -r mode sha1 stage just_cloned sm_path
+	while read -r quickabort sha1 just_cloned sm_path
-		die_if_unmatched "$mode" "$sha1"
+		die_if_unmatched "$quickabort" "$sha1"
 		name=$(git submodule--helper name "$sm_path") || exit
 		if ! test -z "$update"

  parent reply index

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-18 19:48 [PATCH 0/6] Resend of origin/sb/submodule-update-in-c Stefan Beller
2018-07-18 19:48 ` [PATCH 1/6] align error reporting for update mode to use path Stefan Beller
2018-07-18 19:48 ` Stefan Beller [this message]
2018-07-18 19:48 ` [PATCH 3/6] builtin/submodule--helper: factor out submodule updating Stefan Beller
2018-07-18 19:48 ` [PATCH 4/6] builtin/submodule--helper: store update_clone information in a struct Stefan Beller
2018-07-18 19:48 ` [PATCH 5/6] builtin/submodule--helper: factor out method to update a single submodule Stefan Beller
2018-07-18 19:48 ` [PATCH 6/6] submodule--helper: introduce new update-module-mode helper Stefan Beller
2018-07-18 22:24 ` [PATCH 0/6] Resend of origin/sb/submodule-update-in-c Junio C Hamano
2018-07-18 23:11   ` Stefan Beller
  -- strict thread matches above, loose matches on Subject: below --
2018-07-12 19:47 [PATCH 0/6] convert part of cmd_update to C Stefan Beller
2018-07-12 19:47 ` [PATCH 2/6] rename unused variables Stefan Beller
2018-07-12 21:24   ` Junio C Hamano

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Newsgroups are available over NNTP:

 note: .onion URLs require Tor:
       or Tor2web:

AGPL code for this site: git clone public-inbox