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

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

From
David Aguilar <davvid@gmail.com>
Date
Feb 10, 2012, 02:42 UTC
Message-ID
<CAJDDKr58LV9EDJZP+3S0YfyTOXFgJWD6nm=AiA19MkyBF-wb_g@mail.gmail.com>
In-Reply-To
<20120209191742.GA20703@unpythonic.net>
On Thu, Feb 9, 2012 at 11:17 AM, Jeff Epler <jepler@unpythonic.net> wrote:
Show 30 quoted lines
> 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\"

We originally used the --output test so that we wouldn't have to check for a specific version. Does your meld support `meld --version`, and what does it output?

I'm thinking that maybe we should just try and parse the version number since it seems like we cannot depend on ancient meld's return code.

Thanks Jeff.  I'll see what we can do about it.
-- 
David
Previous: Jeff EplerNext: Jonathan Nieder
Message 2 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.