/usr/libexec/git-core
NameSizeModeActions
mergetools/-0755rm
git43973520755editdlrm
git-add43973520755editdlrm
git-am43973520755editdlrm
git-annotate43973520755editdlrm
git-apply43973520755editdlrm
git-archive43973520755editdlrm
git-backfill43973520755editdlrm
git-bisect43973520755editdlrm
git-blame43973520755editdlrm
git-branch43973520755editdlrm
git-bugreport43973520755editdlrm
git-bundle43973520755editdlrm
git-cat-file43973520755editdlrm
git-check-attr43973520755editdlrm
git-check-ignore43973520755editdlrm
git-check-mailmap43973520755editdlrm
git-check-ref-format43973520755editdlrm
git-checkout43973520755editdlrm
git-checkout--worker43973520755editdlrm
git-checkout-index43973520755editdlrm
git-cherry43973520755editdlrm
git-cherry-pick43973520755editdlrm
git-clean43973520755editdlrm
git-clone43973520755editdlrm
git-column43973520755editdlrm
git-commit43973520755editdlrm
git-commit-graph43973520755editdlrm
git-commit-tree43973520755editdlrm
git-config43973520755editdlrm
git-contacts45090755editdlrm
git-count-objects43973520755editdlrm
git-credential43973520755editdlrm
git-credential-cache43973520755editdlrm
git-credential-cache--daemon43973520755editdlrm
git-credential-netrc112460755editdlrm
git-credential-store43973520755editdlrm
git-describe43973520755editdlrm
git-diagnose43973520755editdlrm
git-diff43973520755editdlrm
git-diff-files43973520755editdlrm
git-diff-index43973520755editdlrm
git-diff-pairs43973520755editdlrm
git-diff-tree43973520755editdlrm
git-difftool43973520755editdlrm
git-difftool--helper26640755editdlrm
git-fast-export43973520755editdlrm
git-fast-import43973520755editdlrm
git-fetch43973520755editdlrm
git-fetch-pack43973520755editdlrm
git-filter-branch157950755editdlrm
git-fmt-merge-msg43973520755editdlrm
git-for-each-ref43973520755editdlrm
git-for-each-repo43973520755editdlrm
git-format-patch43973520755editdlrm
git-fsck43973520755editdlrm
git-fsck-objects43973520755editdlrm
git-fsmonitor--daemon43973520755editdlrm
git-gc43973520755editdlrm
git-get-tar-commit-id43973520755editdlrm
git-grep43973520755editdlrm
git-hash-object43973520755editdlrm
git-help43973520755editdlrm
git-hook43973520755editdlrm
git-http-backend8488480755editdlrm
git-http-fetch9332800755editdlrm
git-http-push12950160755editdlrm
git-imap-send9200720755editdlrm
git-index-pack43973520755editdlrm
git-init43973520755editdlrm
git-init-db43973520755editdlrm
git-interpret-trailers43973520755editdlrm
git-last-modified43973520755editdlrm
git-log43973520755editdlrm
git-ls-files43973520755editdlrm
git-ls-remote43973520755editdlrm
git-ls-tree43973520755editdlrm
git-mailinfo43973520755editdlrm
git-mailsplit43973520755editdlrm
git-maintenance43973520755editdlrm
git-merge43973520755editdlrm
git-merge-base43973520755editdlrm
git-merge-file43973520755editdlrm
git-merge-index43973520755editdlrm
git-merge-octopus24810755editdlrm
git-merge-one-file36990755editdlrm
git-merge-ours43973520755editdlrm
git-merge-recursive43973520755editdlrm
git-merge-resolve12300755editdlrm
git-merge-subtree43973520755editdlrm
git-merge-tree43973520755editdlrm
git-mergetool116970755editdlrm
git-mergetool--lib109080644editdlrm
git-mktag43973520755editdlrm
git-mktree43973520755editdlrm
git-multi-pack-index43973520755editdlrm
git-mv43973520755editdlrm
git-name-rev43973520755editdlrm
git-notes43973520755editdlrm
git-pack-objects43973520755editdlrm
git-pack-redundant43973520755editdlrm
git-pack-refs43973520755editdlrm
git-patch-id43973520755editdlrm
git-prune43973520755editdlrm
git-prune-packed43973520755editdlrm
git-pull43973520755editdlrm
git-push43973520755editdlrm
git-quiltimport37000755editdlrm
git-range-diff43973520755editdlrm
git-read-tree43973520755editdlrm
git-rebase43973520755editdlrm
git-receive-pack43973520755editdlrm
git-reflog43973520755editdlrm
git-refs43973520755editdlrm
git-remote43973520755editdlrm
git-remote-ext43973520755editdlrm
git-remote-fd43973520755editdlrm
git-remote-ftp9668400755editdlrm
git-remote-ftps9668400755editdlrm
git-remote-http9668400755editdlrm
git-remote-https9668400755editdlrm
git-repack43973520755editdlrm
git-replace43973520755editdlrm
git-replay43973520755editdlrm
git-repo43973520755editdlrm
git-request-pull39960755editdlrm
git-rerere43973520755editdlrm
git-reset43973520755editdlrm
git-restore43973520755editdlrm
git-rev-list43973520755editdlrm
git-rev-parse43973520755editdlrm
git-revert43973520755editdlrm
git-rm43973520755editdlrm
git-send-pack43973520755editdlrm
git-sh-i18n16830644editdlrm
git-sh-i18n--envsubst8312640755editdlrm
git-sh-setup83980644editdlrm
git-shell8269600755editdlrm
git-shortlog43973520755editdlrm
git-show43973520755editdlrm
git-show-branch43973520755editdlrm
git-show-index43973520755editdlrm
git-show-ref43973520755editdlrm
git-sparse-checkout43973520755editdlrm
git-stage43973520755editdlrm
git-stash43973520755editdlrm
git-status43973520755editdlrm
git-stripspace43973520755editdlrm
git-submodule104970755editdlrm
git-submodule--helper43973520755editdlrm
git-switch43973520755editdlrm
git-symbolic-ref43973520755editdlrm
git-tag43973520755editdlrm
git-unpack-file43973520755editdlrm
git-unpack-objects43973520755editdlrm
git-update-index43973520755editdlrm
git-update-ref43973520755editdlrm
git-update-server-info43973520755editdlrm
git-upload-archive43973520755editdlrm
git-upload-pack43973520755editdlrm
git-var43973520755editdlrm
git-verify-commit43973520755editdlrm
git-verify-pack43973520755editdlrm
git-verify-tag43973520755editdlrm
git-version43973520755editdlrm
git-web--browse44050755editdlrm
git-whatchanged43973520755editdlrm
git-worktree43973520755editdlrm
git-write-tree43973520755editdlrm
scalar8769680755editdlrm
Edit: /usr/libexec/git-core/git-submodule (10497B)
#!/usr/bin/sh # # git-submodule.sh: add, init, update or list git submodules # # Copyright (c) 2007 Lars Hjemli dashless=$(basename "$0" | sed -e 's/-/ /') USAGE="[--quiet] [--cached] or: $dashless [--quiet] add [-b ] [-f|--force] [--name ] [--reference ] [--] [] or: $dashless [--quiet] status [--cached] [--recursive] [--] [...] or: $dashless [--quiet] init [--] [...] or: $dashless [--quiet] deinit [-f|--force] (--all| [--] ...) or: $dashless [--quiet] update [--init [--filter=]] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference ] [--recursive] [--[no-]single-branch] [--] [...] or: $dashless [--quiet] set-branch (--default|--branch ) [--] or: $dashless [--quiet] set-url [--] or: $dashless [--quiet] summary [--cached|--files] [--summary-limit ] [commit] [--] [...] or: $dashless [--quiet] foreach [--recursive] or: $dashless [--quiet] sync [--recursive] [--] [...] or: $dashless [--quiet] absorbgitdirs [--] [...]" OPTIONS_SPEC= SUBDIRECTORY_OK=Yes . git-sh-setup require_work_tree wt_prefix=$(git rev-parse --show-prefix) cd_to_toplevel # Tell the rest of git that any URLs we get don't come # directly from the user, so it can apply policy as appropriate. GIT_PROTOCOL_FROM_USER=0 export GIT_PROTOCOL_FROM_USER command= quiet= branch= force= reference= cached= recursive= init= require_init= files= remote= no_fetch= rebase= merge= checkout= name= depth= progress= dissociate= single_branch= jobs= recommend_shallow= filter= all= default= summary_limit= for_status= # # Add a new submodule to the working tree, .gitmodules and the index # # $@ = repo path # # optional branch is stored in global branch variable # cmd_add() { # parse $args after "submodule ... add". while test $# -ne 0 do case "$1" in -b | --branch) case "$2" in '') usage ;; esac branch="--branch=$2" shift ;; -b* | --branch=*) branch="$1" ;; -f | --force) force=$1 ;; -q|--quiet) quiet=$1 ;; --progress) progress=$1 ;; --reference) case "$2" in '') usage ;; esac reference="--reference=$2" shift ;; --reference=*) reference="$1" ;; --ref-format) case "$2" in '') usage ;; esac ref_format="--ref-format=$2" shift ;; --ref-format=*) ref_format="$1" ;; --dissociate) dissociate=$1 ;; --name) case "$2" in '') usage ;; esac name="--name=$2" shift ;; --name=*) name="$1" ;; --depth) case "$2" in '') usage ;; esac depth="--depth=$2" shift ;; --depth=*) depth="$1" ;; --) shift break ;; -*) usage ;; *) break ;; esac shift done if test -z "$1" then usage fi git ${wt_prefix:+-C "$wt_prefix"} submodule--helper add \ $quiet \ $force \ $progress \ ${branch:+"$branch"} \ ${reference:+"$reference"} \ ${ref_format:+"$ref_format"} \ $dissociate \ ${name:+"$name"} \ ${depth:+"$depth"} \ -- \ "$@" } # # Execute an arbitrary command sequence in each checked out # submodule # # $@ = command to execute # cmd_foreach() { # parse $args after "submodule ... foreach". while test $# -ne 0 do case "$1" in -q|--quiet) quiet=$1 ;; --recursive) recursive=$1 ;; -*) usage ;; *) break ;; esac shift done git ${wt_prefix:+-C "$wt_prefix"} submodule--helper foreach \ $quiet \ $recursive \ -- \ "$@" } # # Register submodules in .git/config # # $@ = requested paths (default to all) # cmd_init() { # parse $args after "submodule ... init". while test $# -ne 0 do case "$1" in -q|--quiet) quiet=$1 ;; --) shift break ;; -*) usage ;; *) break ;; esac shift done git ${wt_prefix:+-C "$wt_prefix"} submodule--helper init \ $quiet \ -- \ "$@" } # # Unregister submodules from .git/config and remove their work tree # cmd_deinit() { # parse $args after "submodule ... deinit". while test $# -ne 0 do case "$1" in -f|--force) force=$1 ;; -q|--quiet) quiet=$1 ;; --all) all=$1 ;; --) shift break ;; -*) usage ;; *) break ;; esac shift done git ${wt_prefix:+-C "$wt_prefix"} submodule--helper deinit \ $quiet \ $force \ $all \ -- \ "$@" } # # Update each submodule path to correct revision, using clone and checkout as needed # # $@ = requested paths (default to all) # cmd_update() { # parse $args after "submodule ... update". while test $# -ne 0 do case "$1" in -q|--quiet) quiet=$1 ;; -v|--verbose) quiet= ;; --progress) progress=$1 ;; -i|--init) init=$1 ;; --require-init) require_init=$1 ;; --remote) remote=$1 ;; -N|--no-fetch) no_fetch=$1 ;; -f|--force) force=$1 ;; -r|--rebase) rebase=$1 ;; --ref-format) case "$2" in '') usage ;; esac ref_format="--ref-format=$2" shift ;; --ref-format=*) ref_format="$1" ;; --reference) case "$2" in '') usage ;; esac reference="--reference=$2" shift ;; --reference=*) reference="$1" ;; --dissociate) dissociate=$1 ;; -m|--merge) merge=$1 ;; --recursive) recursive=$1 ;; --checkout) checkout=$1 ;; --recommend-shallow|--no-recommend-shallow) recommend_shallow=$1 ;; --depth) case "$2" in '') usage ;; esac depth="--depth=$2" shift ;; --depth=*) depth="$1" ;; -j|--jobs) case "$2" in '') usage ;; esac jobs="--jobs=$2" shift ;; -j*|--jobs=*) jobs="$1" ;; --single-branch|--no-single-branch) single_branch=$1 ;; --filter) case "$2" in '') usage ;; esac filter="--filter=$2" shift ;; --filter=*) filter="$1" ;; --) shift break ;; -*) usage ;; *) break ;; esac shift done git ${wt_prefix:+-C "$wt_prefix"} submodule--helper update \ $quiet \ $force \ $progress \ $remote \ $recursive \ $init \ $no_fetch \ $rebase \ $merge \ $checkout \ ${ref_format:+"$ref_format"} \ ${reference:+"$reference"} \ $dissociate \ ${depth:+"$depth"} \ $require_init \ $single_branch \ $recommend_shallow \ $jobs \ $filter \ -- \ "$@" } # # Configures a submodule's default branch # # $@ = requested path # cmd_set_branch() { # parse $args after "submodule ... set-branch". while test $# -ne 0 do case "$1" in -q|--quiet) # we don't do anything with this but we need to accept it ;; -d|--default) default=$1 ;; -b|--branch) case "$2" in '') usage ;; esac branch="--branch=$2" shift ;; -b*|--branch=*) branch="$1" ;; --) shift break ;; -*) usage ;; *) break ;; esac shift done git ${wt_prefix:+-C "$wt_prefix"} submodule--helper set-branch \ $quiet \ ${branch:+"$branch"} \ $default \ -- \ "$@" } # # Configures a submodule's remote url # # $@ = requested path, requested url # cmd_set_url() { # parse $args after "submodule ... set-url". while test $# -ne 0 do case "$1" in -q|--quiet) quiet=$1 ;; --) shift break ;; -*) usage ;; *) break ;; esac shift done git ${wt_prefix:+-C "$wt_prefix"} submodule--helper set-url \ $quiet \ -- \ "$@" } # # Show commit summary for submodules in index or working tree # # If '--cached' is given, show summary between index and given commit, # or between working tree and given commit # # $@ = [commit (default 'HEAD'),] requested paths (default all) # cmd_summary() { # parse $args after "submodule ... summary". while test $# -ne 0 do case "$1" in --cached) cached=$1 ;; --files) files=$1 ;; --for-status) for_status=$1 ;; -n|--summary-limit) case "$2" in '') usage ;; esac summary_limit="--summary-limit=$2" shift ;; -n*|--summary-limit=*) summary_limit="$1" ;; --) shift break ;; -*) usage ;; *) break ;; esac shift done git ${wt_prefix:+-C "$wt_prefix"} submodule--helper summary \ $files \ $cached \ $for_status \ ${summary_limit:+"$summary_limit"} \ -- \ "$@" } # # List all submodules, prefixed with: # - submodule not initialized # + different revision checked out # # If --cached was specified the revision in the index will be printed # instead of the currently checked out revision. # # $@ = requested paths (default to all) # cmd_status() { # parse $args after "submodule ... status". while test $# -ne 0 do case "$1" in -q|--quiet) quiet=$1 ;; --cached) cached=$1 ;; --recursive) recursive=$1 ;; --) shift break ;; -*) usage ;; *) break ;; esac shift done git ${wt_prefix:+-C "$wt_prefix"} submodule--helper status \ $quiet \ $cached \ $recursive \ -- \ "$@" } # # Sync remote urls for submodules # This makes the value for remote.$remote.url match the value # specified in .gitmodules. # cmd_sync() { # parse $args after "submodule ... sync". while test $# -ne 0 do case "$1" in -q|--quiet) quiet=$1 shift ;; --recursive) recursive=$1 shift ;; --) shift break ;; -*) usage ;; *) break ;; esac done git ${wt_prefix:+-C "$wt_prefix"} submodule--helper sync \ $quiet \ $recursive \ -- \ "$@" } cmd_absorbgitdirs() { git ${wt_prefix:+-C "$wt_prefix"} submodule--helper absorbgitdirs "$@" } # This loop parses the command line arguments to find the # subcommand name to dispatch. Parsing of the subcommand specific # options are primarily done by the subcommand implementations. # Subcommand specific options such as --branch and --cached are # parsed here as well, for backward compatibility. while test $# != 0 && test -z "$command" do case "$1" in add | foreach | init | deinit | update | set-branch | set-url | status | summary | sync | absorbgitdirs) command=$1 ;; -q|--quiet) quiet=$1 ;; --cached) cached=$1 ;; --) break ;; -*) usage ;; *) break ;; esac shift done # No command word defaults to "status" if test -z "$command" then if test $# = 0 then command=status else usage fi fi # "--cached" is accepted only by "status" and "summary" if test -n "$cached" && test "$command" != status && test "$command" != summary then usage fi "cmd_$(echo $command | sed -e s/-/_/g)" "$@"