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'\n" "$MERGED" if use_ext_cmd then printf "Launch '%s' [Y/n]: " \ "$GIT_DIFFTOOL_EXTCMD" else printf "Launch '%s' [Y/n]: " "$merge_tool" fi if read ans && test "$ans" = n then return fi fi if use_ext_cmd then export BASE eval $GIT_DIFFTOOL_EXTCMD '"$LOCAL"' '"$REMOTE"' else 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)" || exit fi fi if test -n "$GIT_DIFFTOOL_DIRDIFF" then LOCAL="$1" REMOTE="$2" 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" shift 7 done fi
[+]
..
[-] git-sh-setup
[edit]
[-] git-bisect--helper
[edit]
[-] git-check-attr
[edit]
[-] git-show
[edit]
[-] git-receive-pack
[edit]
[-] git-bundle
[edit]
[-] git-config
[edit]
[-] git-merge-recursive
[edit]
[-] git-imap-send
[edit]
[-] git-remote-testpy
[edit]
[-] git-revert
[edit]
[-] git-mergetool
[edit]
[-] git-rev-parse
[edit]
[-] git-sh-i18n--envsubst
[edit]
[-] git-fast-export
[edit]
[-] git-fmt-merge-msg
[edit]
[-] git-whatchanged
[edit]
[-] git-submodule--helper
[edit]
[-] git-reflog
[edit]
[-] git-column
[edit]
[-] git-prune-packed
[edit]
[-] git-credential-cache
[edit]
[-] git-upload-pack
[edit]
[-] git
[edit]
[-] git-remote-http
[edit]
[-] git-difftool
[edit]
[-] git-request-pull
[edit]
[-] git-merge-subtree
[edit]
[-] git-parse-remote
[edit]
[-] git-fetch-pack
[edit]
[-] git-send-pack
[edit]
[-] git-diff-index
[edit]
[-] git-cherry
[edit]
[-] git-ls-files
[edit]
[-] git-show-index
[edit]
[-] git-unpack-objects
[edit]
[-] git-write-tree
[edit]
[-] git-upload-archive
[edit]
[-] git-merge-index
[edit]
[-] git-gc
[edit]
[-] git-init-db
[edit]
[-] git-diff
[edit]
[-] git-credential
[edit]
[-] git-notes
[edit]
[-] git-for-each-ref
[edit]
[-] git-symbolic-ref
[edit]
[-] git-diff-files
[edit]
[-] git-fetch
[edit]
[-] git-merge-tree
[edit]
[-] git-update-index
[edit]
[-] git-diff-tree
[edit]
[-] git-commit
[edit]
[-] git-tag
[edit]
[-] git-cat-file
[edit]
[-] git-remote-fd
[edit]
[-] git-rebase--merge
[edit]
[-] git-bisect
[edit]
[-] git-sh-i18n
[edit]
[-] git-cherry-pick
[edit]
[-] git-checkout-index
[edit]
[-] git-credential-store
[edit]
[-] git-annotate
[edit]
[-] git-stage
[edit]
[-] git-remote-https
[edit]
[-] git-patch-id
[edit]
[-] git-branch
[edit]
[-] git-var
[edit]
[-] git-rm
[edit]
[-] git-help
[edit]
[-] git-commit-tree
[edit]
[-] git-merge
[edit]
[-] git-reset
[edit]
[-] git-stripspace
[edit]
[-] git-pack-refs
[edit]
[-] git-lost-found
[edit]
[-] git-show-ref
[edit]
[-] git-update-server-info
[edit]
[-] git-check-ignore
[edit]
[-] git-am
[edit]
[-] git-check-ref-format
[edit]
[-] git-hash-object
[edit]
[-] git-ls-tree
[edit]
[-] git-apply
[edit]
[-] git-format-patch
[edit]
[-] git-verify-tag
[edit]
[-] git-fsck-objects
[edit]
[-] git-tar-tree
[edit]
[-] git-read-tree
[edit]
[-] git-update-ref
[edit]
[-] git-count-objects
[edit]
[-] git-fast-import
[edit]
[-] git-mergetool--lib
[edit]
[-] git-push
[edit]
[-] git-subtree
[edit]
[-] git-rebase--am
[edit]
[-] git-merge-ours
[edit]
[-] git-remote-ftps
[edit]
[-] git-blame
[edit]
[-] git-init
[edit]
[-] git-merge-one-file
[edit]
[-] git-show-branch
[edit]
[-] git-clone
[edit]
[-] git-rebase
[edit]
[-] git-remote
[edit]
[-] git-rerere
[edit]
[-] git-ls-remote
[edit]
[-] git-merge-resolve
[edit]
[-] git-rev-list
[edit]
[-] git-pack-objects
[edit]
[-] git-fsck
[edit]
[-] git-rebase--interactive
[edit]
[-] git-mv
[edit]
[-] git-unpack-file
[edit]
[-] git-http-fetch
[edit]
[-] git-shell
[edit]
[-] git-status
[edit]
[-] git-shortlog
[edit]
[-] git-verify-pack
[edit]
[-] git-name-rev
[edit]
[+]
mergetools
[-] git-merge-file
[edit]
[-] git-web--browse
[edit]
[-] git-remote-ext
[edit]
[-] git-grep
[edit]
[-] git-mktree
[edit]
[-] git-credential-cache--daemon
[edit]
[-] git-stash
[edit]
[-] git-add--interactive
[edit]
[-] git-checkout
[edit]
[-] git-pull
[edit]
[-] git-replace
[edit]
[-] git-merge-octopus
[edit]
[-] git-mailsplit
[edit]
[-] git-clean
[edit]
[-] git-repack
[edit]
[-] git-add
[edit]
[-] git-peek-remote
[edit]
[-] git-http-push
[edit]
[-] git-log
[edit]
[-] git-prune
[edit]
[-] git-get-tar-commit-id
[edit]
[-] git-repo-config
[edit]
[-] git-mktag
[edit]
[-] git-http-backend
[edit]
[-] git-index-pack
[edit]
[-] git-difftool--helper
[edit]
[-] git-submodule
[edit]
[-] git-relink
[edit]
[-] git-remote-ftp
[edit]
[-] git-merge-base
[edit]
[-] git-describe
[edit]
[-] git-filter-branch
[edit]
[-] git-mailinfo
[edit]
[-] git-archive
[edit]
[-] git-pack-redundant
[edit]
[-] git-quiltimport
[edit]