git: Use `update` instead of `foreach` in alias 'gSu'

Modern `git` can use `submodule` option `update` instead of `foreach`
to achieve approximately similar outcome.

To allows call without assuming that all submodules will have default
branch as `master`, the preferred approach would be to call
`git submodule update --remote --recursive` after registering the
correct branch for submodule in `.gitmodules`:

```
git config -f .gitmodules submodule.<path>.branch <branch>
```

For more discussion, see: https://stackoverflow.com/a/33835815

Signed-off-by: Indrajit Raychaudhuri <irc@indrajit.com>
This commit is contained in:
hidekuro 2021-05-17 17:44:02 +09:00 committed by Indrajit Raychaudhuri
parent a3643f124e
commit c4a8f446c6
1 changed files with 1 additions and 1 deletions

View File

@ -252,7 +252,7 @@ if ! zstyle -t ':prezto:module:git:alias' skip; then
alias gSl='git submodule status'
alias gSm='git-submodule-move'
alias gSs='git submodule sync'
alias gSu='git submodule foreach git pull origin master'
alias gSu='git submodule update --remote --recursive'
alias gSx='git-submodule-remove'
# Tag (t)