Skip to content

Commit 508416d

Browse files
committed
Merge branch 'ks/submodule-cleanup'
Code cleanup. * ks/submodule-cleanup: submodule: remove unnecessary `prefix` based option logic
2 parents 3b57e72 + 1cf823d commit 508416d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

git-submodule.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ cmd_foreach()
335335
shift
336336
done
337337

338-
git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} submodule--helper foreach ${GIT_QUIET:+--quiet} ${recursive:+--recursive} -- "$@"
338+
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper foreach ${GIT_QUIET:+--quiet} ${recursive:+--recursive} -- "$@"
339339
}
340340

341341
#
@@ -402,7 +402,7 @@ cmd_deinit()
402402
shift
403403
done
404404

405-
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper deinit ${GIT_QUIET:+--quiet} ${prefix:+--prefix "$prefix"} ${force:+--force} ${deinit_all:+--all} -- "$@"
405+
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper deinit ${GIT_QUIET:+--quiet} ${force:+--force} ${deinit_all:+--all} -- "$@"
406406
}
407407

408408
is_tip_reachable () (
@@ -726,7 +726,7 @@ cmd_set_branch() {
726726
shift
727727
done
728728

729-
git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} submodule--helper set-branch ${GIT_QUIET:+--quiet} ${branch:+--branch "$branch"} ${default:+--default} -- "$@"
729+
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper set-branch ${GIT_QUIET:+--quiet} ${branch:+--branch "$branch"} ${default:+--default} -- "$@"
730730
}
731731

732732
#
@@ -755,7 +755,7 @@ cmd_set_url() {
755755
shift
756756
done
757757

758-
git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} submodule--helper set-url ${GIT_QUIET:+--quiet} -- "$@"
758+
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper set-url ${GIT_QUIET:+--quiet} -- "$@"
759759
}
760760

761761
#
@@ -807,7 +807,7 @@ cmd_summary() {
807807
shift
808808
done
809809

810-
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper summary ${prefix:+--prefix "$prefix"} ${files:+--files} ${cached:+--cached} ${for_status:+--for-status} ${summary_limit:+-n $summary_limit} -- "$@"
810+
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper summary ${files:+--files} ${cached:+--cached} ${for_status:+--for-status} ${summary_limit:+-n $summary_limit} -- "$@"
811811
}
812812
#
813813
# List all submodules, prefixed with:
@@ -848,7 +848,7 @@ cmd_status()
848848
shift
849849
done
850850

851-
git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} submodule--helper status ${GIT_QUIET:+--quiet} ${cached:+--cached} ${recursive:+--recursive} -- "$@"
851+
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper status ${GIT_QUIET:+--quiet} ${cached:+--cached} ${recursive:+--recursive} -- "$@"
852852
}
853853
#
854854
# Sync remote urls for submodules
@@ -881,7 +881,7 @@ cmd_sync()
881881
esac
882882
done
883883

884-
git ${wt_prefix:+-C "$wt_prefix"} ${prefix:+--super-prefix "$prefix"} submodule--helper sync ${GIT_QUIET:+--quiet} ${recursive:+--recursive} -- "$@"
884+
git ${wt_prefix:+-C "$wt_prefix"} submodule--helper sync ${GIT_QUIET:+--quiet} ${recursive:+--recursive} -- "$@"
885885
}
886886

887887
cmd_absorbgitdirs()

0 commit comments

Comments
 (0)