Sublime Text 3 + Git 包:不会启动 difftool (Meld)

Sublime Text 3 + Git package: won't launch difftool (Meld)

我正在使用 Sublime Text 3 和 Git package to manage my repo. I have the .gitconfig file set up to use the Meld 工具 (Meld v3.14.2):

[diff]
    external = meld
    tool = meld

我可以使用 $ git difftool 从命令提示符启动它,没有任何问题。

我过去可以通过 Git Diff Tool Current FileGit Diff Tool All 命令对 git 包执行相同的操作。重新安装 Sublime Text 3 后,当我尝试执行这两个操作中的任何一个时,出现 Sublime 底部的 window,询问:

Viewing (1/1): 'test.py'
Launch 'meld' [Y/n]: 

我不能在这里输入任何文字,而且我以前不需要。如果我尝试 Git Diff Current file 它会打开一个新标签页:

Usage: 
  meld                                 Iniciar con una ventana vacía
  meld <archivo|carpeta>               Iniciar una comparación de control de versiones
  meld <archivo> <archivo> [<archivo>] Iniciar una comparación de archivo de 2 ó 3 vías
  meld <carpeta> <carpeta> [<carpeta>] Iniciar una comparación de carpetas de 2 ó 3 vías

Error: too many arguments (expected 0-3, got 7)

fatal: External Diff died, stopping at test.py

(大致翻译自西班牙语)所以看起来 Meld 的参数没有正确传递。这是我的默认配置文件,我没有用户配置:

{
    // save before running commands
    "save_first": true

    // if present, use this command instead of plain "git"
    // e.g. "/Users/kemayo/bin/git" or "C:\bin\git.exe"
    ,"git_command": false

    // if present, use this command instead of plain "gitk"
    // e.g. "/Users/kemayo/bin/gitk" or "C:\bin\gitk.exe"
    ,"gitk_command": false

    // point this the installation location of git-flow
    ,"git_flow_command": "/usr/local/bin/git-flow"

    // use the panel for diff output, rather than a new scratch window (new tab)
    ,"diff_panel": false

    // If you'd rather have your status command open files instead of show you a
    // diff, set this to true.  You can still do `Git: Status` followed by
    // 'Git: Diff Current File' to get a file diff
    ,"status_opens_file": false

    // Use --verbose flag for commit messages
    ,"verbose_commits": true

    // How many commit messages to store in the history. Set to 0 to disable.
    ,"history_size": 5

    // Show git flow commands
    ,"flow": false

    // Annotations default to being on for all files. Can be slow in some cases.
    ,"annotations": false

    // statusbar
    ,"statusbar_branch": true
    // Symbols for quick git status in status bar
    ,"statusbar_status": true
    ,"statusbar_status_symbols" : {"modified": "≠", "added": "+", "deleted": "×", "untracked": "?", "conflicts": "‼", "renamed":"R", "copied":"C", "clean": "✓", "separator": " "}

    // e.g. "Packages/Git/syntax/Git Commit Message.tmLanguage"
    ,"diff_syntax": "Packages/Diff/Diff.tmLanguage"

    // Rulers for commit view
    ,"commit_rulers": [70]

    // Watch for gitignore changes?
    ,"gitignore_sync": false
}

看来您需要将 git 设置为不提示。在您的 .gitconfig 文件中,添加:

[difftool]
        prompt = false