PATH:
usr
/
libexec
/
git-core
#!/bin/sh # git-difftool--helper is a GIT_EXTERNAL_DIFF-compatible diff tool launcher. # This script is typically launched by using the 'git difftool' # convenience command. # # Copyright (c) 2009, 2010 David Aguilar TOOL_MODE=diff . git-mergetool--lib # difftool.prompt controls the default prompt/no-prompt behavior # and is overridden with $GIT_DIFFTOOL*_PROMPT. should_prompt () { prompt_merge=$(git config --bool mergetool.prompt || echo true) prompt=$(git config --bool difftool.prompt || echo $prompt_merge) if test "$prompt" = true then test -z "$GIT_DIFFTOOL_NO_PROMPT" else test -n "$GIT_DIFFTOOL_PROMPT" fi } # Indicates that --extcmd=... was specified use_ext_cmd () { test -n "$GIT_DIFFTOOL_EXTCMD" } launch_merge_tool () { # Merged is the filename as it appears in the work tree # Local is the contents of a/filename # Remote is the contents of b/filename # Custom merge tool commands might use $BASE so we provide it MERGED="$1" LOCAL="$2" REMOTE="$3" BASE="$1" # $LOCAL and $REMOTE are temporary files so prompt # the user with the real $MERGED name before launching $merge_tool. if should_prompt then printf "\nViewing (%s/%s): '%s'\n" "$GIT_DIFF_PATH_COUNTER" \ "$GIT_DIFF_PATH_TOTAL" "$MERGED" if use_ext_cmd then printf "Launch '%s' [Y/n]? " \ "$GIT_DIFFTOOL_EXTCMD" else printf "Launch '%s' [Y/n]? " "$merge_tool" fi read ans || return if test "$ans" = n then return fi fi if use_ext_cmd then export BASE eval $GIT_DIFFTOOL_EXTCMD '"$LOCAL"' '"$REMOTE"' else initialize_merge_tool "$merge_tool" # ignore the error from the above --- run_merge_tool # will diagnose unusable tool by itself run_merge_tool "$merge_tool" fi } if ! use_ext_cmd then if test -n "$GIT_DIFF_TOOL" then merge_tool="$GIT_DIFF_TOOL" else merge_tool="$(get_merge_tool)" subshell_exit_status=$? if test $subshell_exit_status -gt 1 then exit $subshell_exit_status fi fi fi if test -n "$GIT_DIFFTOOL_DIRDIFF" then LOCAL="$1" REMOTE="$2" initialize_merge_tool "$merge_tool" # ignore the error from the above --- run_merge_tool # will diagnose unusable tool by itself run_merge_tool "$merge_tool" false else # Launch the merge tool on each path provided by 'git diff' while test $# -gt 6 do launch_merge_tool "$1" "$2" "$5" status=$? if test $status -ge 126 then # Command not found (127), not executable (126) or # exited via a signal (>= 128). exit $status fi if test "$status" != 0 && test "$GIT_DIFFTOOL_TRUST_EXIT_CODE" = true then exit $status fi shift 7 done fi exit 0
[-] git-apply
[edit]
[-] git-fast-export
[edit]
[-] git-get-tar-commit-id
[edit]
[-] git-fast-import
[edit]
[-] git-merge-ours
[edit]
[-] git-fsck-objects
[edit]
[-] git-rev-parse
[edit]
[-] git-http-push
[edit]
[-] git-fsck
[edit]
[-] git-filter-branch
[edit]
[-] git-web--browse
[edit]
[-] git-bugreport
[edit]
[-] git-rebase
[edit]
[-] git-checkout--worker
[edit]
[-] git-rm
[edit]
[-] git-stage
[edit]
[-] git-send-pack
[edit]
[-] git-for-each-ref
[edit]
[-] git-merge-one-file
[edit]
[-] git-pack-redundant
[edit]
[-] git-remote-fd
[edit]
[-] git-mailinfo
[edit]
[-] git-fetch-pack
[edit]
[-] git-update-index
[edit]
[-] git-fmt-merge-msg
[edit]
[-] git-commit-tree
[edit]
[-] git-name-rev
[edit]
[-] git-for-each-repo
[edit]
[-] git-credential-netrc
[edit]
[-] git-help
[edit]
[-] git-index-pack
[edit]
[-] git-check-ignore
[edit]
[-] git-tag
[edit]
[-] git-shell
[edit]
[-] git-merge-resolve
[edit]
[-] git-show-branch
[edit]
[-] git-merge
[edit]
[-] git-submodule
[edit]
[-] git-replace
[edit]
[-] git-status
[edit]
[-] git-bisect
[edit]
[-] git-revert
[edit]
[-] git-difftool
[edit]
[-] git-quiltimport
[edit]
[-] git-check-attr
[edit]
[-] git-restore
[edit]
[-] git-unpack-objects
[edit]
[-] git-mv
[edit]
[-] git-var
[edit]
[-] git-show-index
[edit]
[-] git-push
[edit]
[-] git-unpack-file
[edit]
[-] git-reflog
[edit]
[-] git-config
[edit]
[-] git-diff-tree
[edit]
[-] git-cherry-pick
[edit]
[-] git-version
[edit]
[-] git-remote-ext
[edit]
[-] git-submodule--helper
[edit]
[-] git-credential
[edit]
[-] git-count-objects
[edit]
[-] git-merge-base
[edit]
[-] git
[edit]
[-] git-cherry
[edit]
[-] git-annotate
[edit]
[-] git-describe
[edit]
[-] git-ls-tree
[edit]
[-] git-fsmonitor--daemon
[edit]
[-] git-checkout-index
[edit]
[-] git-pack-refs
[edit]
[-] git-blame
[edit]
[-] git-remote-ftps
[edit]
[-] git-verify-commit
[edit]
[-] git-credential-store
[edit]
[-] git-init
[edit]
[-] git-update-server-info
[edit]
[-] git-request-pull
[edit]
[-] git-init-db
[edit]
[-] git-bundle
[edit]
[-] git-merge-recursive
[edit]
[-] git-repack
[edit]
[-] git-verify-pack
[edit]
[-] git-rerere
[edit]
[-] git-column
[edit]
[-] git-stripspace
[edit]
[+]
..
[-] git-hash-object
[edit]
[-] git-ls-remote
[edit]
[-] git-symbolic-ref
[edit]
[+]
mergetools
[-] git-diff-index
[edit]
[-] git-pull
[edit]
[-] git-write-tree
[edit]
[-] git-whatchanged
[edit]
[-] git-mergetool
[edit]
[-] git-http-fetch
[edit]
[-] git-update-ref
[edit]
[-] git-add
[edit]
[-] git-read-tree
[edit]
[-] git-prune-packed
[edit]
[-] git-check-mailmap
[edit]
[-] git-sh-setup
[edit]
[-] git-sh-i18n
[edit]
[-] git-show-ref
[edit]
[-] git-receive-pack
[edit]
[-] git-merge-file
[edit]
[-] git-mailsplit
[edit]
[-] git-range-diff
[edit]
[-] git-mktag
[edit]
[-] git-remote-ftp
[edit]
[-] git-merge-octopus
[edit]
[-] git-remote
[edit]
[-] git-format-patch
[edit]
[-] git-cat-file
[edit]
[-] git-stash
[edit]
[-] git-upload-archive
[edit]
[-] git-clone
[edit]
[-] git-interpret-trailers
[edit]
[-] git-grep
[edit]
[-] git-contacts
[edit]
[-] git-remote-https
[edit]
[-] git-show
[edit]
[-] git-archive
[edit]
[-] git-pack-objects
[edit]
[-] git-verify-tag
[edit]
[-] git-am
[edit]
[-] git-sh-i18n--envsubst
[edit]
[-] git-http-backend
[edit]
[-] git-clean
[edit]
[-] git-branch
[edit]
[-] git-merge-tree
[edit]
[-] scalar
[edit]
[-] git-credential-cache--daemon
[edit]
[-] git-checkout
[edit]
[-] git-worktree
[edit]
[-] git-mergetool--lib
[edit]
[-] git-fetch
[edit]
[-] git-merge-subtree
[edit]
[-] git-prune
[edit]
[-] git-mktree
[edit]
[-] git-notes
[edit]
[-] git-switch
[edit]
[-] git-merge-index
[edit]
[-] git-sparse-checkout
[edit]
[-] git-commit-graph
[edit]
[-] git-shortlog
[edit]
[-] git-maintenance
[edit]
[-] git-patch-id
[edit]
[-] git-upload-pack
[edit]
[-] git-multi-pack-index
[edit]
[-] git-remote-http
[edit]
[-] git-diff
[edit]
[-] git-diagnose
[edit]
[-] git-rev-list
[edit]
[-] git-gc
[edit]
[-] git-check-ref-format
[edit]
[-] git-diff-files
[edit]
[-] git-hook
[edit]
[-] git-reset
[edit]
[-] git-difftool--helper
[edit]
[-] git-imap-send
[edit]
[-] git-log
[edit]
[-] git-ls-files
[edit]
[-] git-commit
[edit]
[-] git-credential-cache
[edit]