@@ -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}
-}
@@ -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" &&
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@gmail.com> --- git-parse-remote.sh | 7 ------- git-submodule.sh | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-)