kemayo / sublime-text-git

Plugin for some git integration into sublime text
MIT License
2.83k stars 390 forks source link

Can't launch Meld difftool #498

Closed Gabriel-p closed 7 years ago

Gabriel-p commented 8 years ago

I have .gitconfig set up to use the Meld tool:

[diff]
    external = meld
    tool = meld

which I can launch with the $ git difftool command with no issues.

I used to be able to do the same with this package and the Git Diff Tool Current File and Git Diff Tool All commands. After re-installing Sublime Text 3, when I attempt to do either of those two actions, the window at the bottom of Sublime appears, asking:

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

I can't input any text here, and furthermore I didn't need to before. If I try Git Diff Current file it opens a new tab with:

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: demasiados argumentos (se esperaban 0-3, se obtuvieron 7)

fatal: Diff externo ha muerto, parando en test.py

I can translate that if you need me to, it looks like the arguments to Meld aren't being passed properly. I'm running Meld 3.14.2 BTW. This is my default config file, I have no User configs:

{
    // 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
}
eynol commented 8 years ago

same problem to me 🤕 I can't launch Diffmerge. ps: Win10 ST3

Gabriel-p commented 8 years ago

No advance on this issue? It's been going on for almost two months now :sob:

Gabriel-p commented 7 years ago

The issue was simpler to solve than I thought. I just had to set the difftool to not prompt with:

[difftool]
        prompt = false
hobson commented 7 years ago

Another way is to pass the -y option to git difftool to prevent it for prompting you about which files/ to diff. If you're getting the prompt in Sublime 3, you probably also would have gotten the prompt it also in the console, if they were both using the same version of git (the source of the prompt).

git difftool -y