diff mbox series

[07/13] submodule: remove fetch_in_submodule shell function

Message ID 20210907115932.36068-8-raykar.ath@gmail.com (mailing list archive)
State Superseded
Headers show
Series submodule: convert the rest of 'update' to C | expand

Commit Message

Atharva Raykar Sept. 7, 2021, 11:59 a.m. UTC
This function has no more use in 'git-submodule.sh' after
bd82d7d467 (submodule: move core cmd_update() logic to C, 2021-07-20),
where we moved all of its uses to C, which has its own version for the
same.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Shourya Shukla <periperidip@gmail.com>
Signed-off-by: Atharva Raykar <raykar.ath@gmail.com>
---
 git-submodule.sh | 14 --------------
 1 file changed, 14 deletions(-)

Comments

Ævar Arnfjörð Bjarmason Sept. 7, 2021, 12:44 p.m. UTC | #1
On Tue, Sep 07 2021, Atharva Raykar wrote:

> This function has no more use in 'git-submodule.sh' after
> bd82d7d467 (submodule: move core cmd_update() logic to C, 2021-07-20),
> where we moved all of its uses to C, which has its own version for the
> same.

This commit ID appears to be a reference to your own 06/13, so the OID
won't work once this is merged to git.git.

Perhaps just squash this into 06/13 instead?
diff mbox series

Patch

diff --git a/git-submodule.sh b/git-submodule.sh
index 4e21d9715c..5197de4551 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -369,20 +369,6 @@  cmd_deinit()
 	git ${wt_prefix:+-C "$wt_prefix"} submodule--helper deinit ${GIT_QUIET:+--quiet} ${force:+--force} ${deinit_all:+--all} -- "$@"
 }
 
-# usage: fetch_in_submodule <module_path> [<depth>] [<sha1>]
-# Because arguments are positional, use an empty string to omit <depth>
-# but include <sha1>.
-fetch_in_submodule () (
-	sanitize_submodule_env &&
-	cd "$1" &&
-	if test $# -eq 3
-	then
-		echo "$3" | git fetch ${GIT_QUIET:+--quiet} --stdin ${2:+"$2"}
-	else
-		git fetch ${GIT_QUIET:+--quiet} ${2:+"$2"}
-	fi
-)
-
 #
 # Update each submodule path to correct revision, using clone and checkout as needed
 #