Skip to content

Instantly share code, notes, and snippets.

@FeepingCreature
Created June 18, 2020 12:26
Show Gist options
  • Save FeepingCreature/7a11568f9b8734ceee072bacce678499 to your computer and use it in GitHub Desktop.
Save FeepingCreature/7a11568f9b8734ceee072bacce678499 to your computer and use it in GitHub Desktop.
#!/bin/sh
GIT="/usr/bin/git"
set -eu
CMD=""
if [ $# -gt 0 ]
then
CMD=$1
fi
if [ "$CMD" = "pull" ]
then
shift
"$GIT" pull --recurse-submodules=on-demand "$@"
elif [ "$CMD" = "fetch" ]
then
shift
"$GIT" fetch --recurse-submodules=on-demand "$@"
else
"$GIT" "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment