Move the only code in git-parse-remote.sh that was actually used to git-submodule.sh. This leaves just a comment in git-parse-remote.sh for ease of review, a later commit will remove it and its build system configuration. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> --- git-parse-remote.sh | 7 ------- git-submodule.sh | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/git-parse-remote.sh b/git-parse-remote.sh index 864519eecf..b8d6a215e6 100644 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@ -1,10 +1,3 @@ # This is a shell library to calculate the remote repository and # upstream branch that should be pulled by "git pull" from the current # branch. - -get_default_remote () { - curr_branch=$(git symbolic-ref -q HEAD) - curr_branch="${curr_branch#refs/heads/}" - origin=$(git config --get "branch.$curr_branch.remote") - echo ${origin:-origin} -} diff --git a/git-submodule.sh b/git-submodule.sh index 7ce52872b7..a6219c34e2 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -413,6 +413,13 @@ is_tip_reachable () ( test -z "$rev" ) +get_default_remote () { + curr_branch=$(git symbolic-ref -q HEAD) + curr_branch="${curr_branch#refs/heads/}" + origin=$(git config --get "branch.$curr_branch.remote") + echo ${origin:-origin} +} + fetch_in_submodule () ( sanitize_submodule_env && cd "$1" && -- 2.29.2.222.g5d2a92d10f8