PATH:
usr
/
libexec
/
git-core
#!/usr/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 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 "$GIT_DIFFTOOL_TRUST_EXIT_CODE" = true then exit $status fi 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-notes
[open]
[-] git-pull
[open]
[-] git-hook
[open]
[-] git-send-pack
[open]
[-] git-switch
[open]
[-] git-sh-i18n
[open]
[-] git-merge-tree
[open]
[-] git-rerere
[open]
[-] git-push
[open]
[-] git-mktree
[open]
[-] git-merge-recursive
[open]
[-] git-imap-send
[open]
[+]
..
[-] git-remote-ftps
[open]
[-] git-reset
[open]
[-] git-worktree
[open]
[-] git-cherry
[open]
[-] git-revert
[open]
[-] git-ls-remote
[open]
[-] git-rev-parse
[open]
[-] git-clone
[open]
[-] git-shell
[open]
[-] git-fsck
[open]
[-] git-commit
[open]
[-] git-difftool
[open]
[-] git-remote-http
[open]
[-] git-remote-ftp
[open]
[-] git-remote-fd
[open]
[-] git-whatchanged
[open]
[-] git-credential
[open]
[-] git-merge-file
[open]
[-] git-init-db
[open]
[-] git-submodule--helper
[open]
[-] git-for-each-repo
[open]
[-] git-clean
[open]
[-] git-repack
[open]
[-] git-name-rev
[open]
[-] git-apply
[open]
[-] git-update-ref
[open]
[-] git-fsck-objects
[open]
[-] git-mv
[open]
[-] git-show-branch
[open]
[-] git-check-mailmap
[open]
[-] git-merge
[open]
[-] git-filter-branch
[open]
[-] git-diff-index
[open]
[-] git-upload-archive
[open]
[-] git-interpret-trailers
[open]
[-] git-mktag
[open]
[-] git-submodule
[open]
[-] git-verify-tag
[open]
[-] git-blame
[open]
[-] git-update-index
[open]
[-] git-ls-files
[open]
[-] git-rebase
[open]
[-] git-cherry-pick
[open]
[-] git-credential-cache--daemon
[open]
[-] git-refs
[open]
[-] git-commit-graph
[open]
[-] git-checkout--worker
[open]
[-] git-mergetool
[open]
[-] git-show-index
[open]
[-] git-ls-tree
[open]
[-] git-mailsplit
[open]
[-] git-maintenance
[open]
[-] git-write-tree
[open]
[-] git-request-pull
[open]
[-] git-add
[open]
[-] git-log
[open]
[-] git-http-fetch
[open]
[-] git-diff-tree
[open]
[-] git-credential-netrc
[open]
[-] git-credential-cache
[open]
[-] git-diagnose
[open]
[-] git-sparse-checkout
[open]
[-] git-prune
[open]
[-] git-pack-refs
[open]
[-] git-bugreport
[open]
[-] git-var
[open]
[-] git-fetch
[open]
[-] git-grep
[open]
[-] git-contacts
[open]
[-] git-check-ignore
[open]
[-] git-range-diff
[open]
[-] git-show-ref
[open]
[-] git-read-tree
[open]
[-] git-merge-base
[open]
[-] git-get-tar-commit-id
[open]
[-] git-difftool--helper
[open]
[-] git-http-backend
[open]
[-] git-verify-commit
[open]
[-] git-verify-pack
[open]
[-] git-pack-objects
[open]
[-] git-merge-one-file
[open]
[-] git-merge-ours
[open]
[-] git-credential-store
[open]
[-] git-cat-file
[open]
[-] git-mailinfo
[open]
[-] git-status
[open]
[-] git-shortlog
[open]
[-] git-am
[open]
[-] git-http-push
[open]
[-] git-pack-redundant
[open]
[-] git-patch-id
[open]
[-] git-hash-object
[open]
[-] git-branch
[open]
[-] git-bundle
[open]
[-] git-index-pack
[open]
[-] git-gc
[open]
[-] git-multi-pack-index
[open]
[-] git-config
[open]
[-] git-unpack-objects
[open]
[-] git-init
[open]
[-] git-stash
[open]
[-] git-symbolic-ref
[open]
[-] git-remote-ext
[open]
[-] git-format-patch
[open]
[-] git-help
[open]
[-] git-upload-pack
[open]
[-] git-prune-packed
[open]
[-] git-bisect
[open]
[-] git-rev-list
[open]
[-] git-rm
[open]
[-] git-checkout
[open]
[-] git
[open]
[-] git-checkout-index
[open]
[-] git-merge-subtree
[open]
[-] git-show
[open]
[-] git-receive-pack
[open]
[-] git-annotate
[open]
[-] git-unpack-file
[open]
[+]
mergetools
[-] git-fmt-merge-msg
[open]
[-] git-merge-resolve
[open]
[-] git-check-ref-format
[open]
[-] git-sh-setup
[open]
[-] git-column
[open]
[-] git-for-each-ref
[open]
[-] git-describe
[open]
[-] git-diff-files
[open]
[-] git-count-objects
[open]
[-] git-fast-export
[open]
[-] git-web--browse
[open]
[-] git-merge-octopus
[open]
[-] git-replace
[open]
[-] git-commit-tree
[open]
[-] git-stripspace
[open]
[-] git-merge-index
[open]
[-] git-archive
[open]
[-] git-version
[open]
[-] git-update-server-info
[open]
[-] git-reflog
[open]
[-] git-fast-import
[open]
[-] git-quiltimport
[open]
[-] git-check-attr
[open]
[-] git-stage
[open]
[-] git-tag
[open]
[-] git-fsmonitor--daemon
[open]
[-] git-mergetool--lib
[open]
[-] git-remote
[open]
[-] scalar
[open]
[-] git-remote-https
[open]
[-] git-fetch-pack
[open]
[-] git-restore
[open]
[-] git-diff
[open]
[-] git-sh-i18n--envsubst
[open]
[-] git-replay
[open]