git/list[1] front-page[2] threads[3] people[4] search[5] about
 

A note on modern git plus ancient meld ("wrong number of arguments")

From
Jeff Epler <jepler@unpythonic.net>
Date
Feb 9, 2012, 19:17 UTC
Message-ID
<20120209191742.GA20703@unpythonic.net>

I note this just in case it helps someone else track down a similar problem, not because I think any change needs to be made to git, as a version of meld new enough to not be affected by this problem is 5 years old.

At $DAYJOB, I recently encountered a problem after upgrading from (don't laugh) git 1.7.1 to 1.7.8.3: one developer stated that meld failed to run, instead displaying the error 'Wrong number of arguments (Got 5)'.

We determined that this user was running a very old version of meld
(1.1.1) from his home directory, as opposed to the also very old system
version of meld (1.1.5).  It turns out that the check added in 
    f61bd9c mergetools/meld: Use '--output' when available
fails on meld 1.1.1, leading git to incorrectly believe the --output
flag is supporrted:
    $ meld-1.1.1 --output /dev/null --help >/dev/null 2>&1; echo $?
    0   # i.e., detected as supported
The test as written gives the correct ("not supported") result with meld
1.1.5:
    $ meld-1.1.5 --output /dev/null --help >/dev/null 2>&1; echo $?
    2   # i.e., detected as supported
so if you encounter the message 'Wrong number of arguments (Got 5)' from
meld, then check whether you have an ancient version of meld.  If for
some reason you can't upgrade to at least 1.1.5, maybe you'd find the
following configuration flags useful:
    [merge]
        tool = ancientmeld
    [mergetool "ancientmeld"]
        cmd = meld-1.1.1 \"$LOCAL\" \"$MERGED\" \"$REMOTE\"
Jeff
Next: David Aguilar
Message 1 of 9 in “A note on modern git plus ancient meld ("wrong number of arguments")”
  1. Jeff EplerFeb 9, 2012
  2. David AguilarFeb 10, 2012
  3. Jonathan NiederFeb 10, 2012
  4. Sebastian SchuberthFeb 10, 2012
  5. Jonathan NiederFeb 10, 2012
  6. Junio C HamanoFeb 10, 2012
  7. mergetools/meld: Use --help output to detect --output supportJonathan Nieder, Feb 10, 2012
  8. Jeff EplerFeb 10, 2012
  9. Jeff EplerFeb 10, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.