There appears to be a regression introduced with Fossil 1.24 on Windows regarding command-line wildcard parsing.

Fossil 1.23 behaves as expected:
> fossil-123 md5sum common\*
common\fileutils.cpp
common\fileutils.h

However, under 1.24:
> fossil md5sum common\*
Assertion failed: (p)->xRealloc==blobReallocMalloc || (p)->xRealloc==blobReallocStatic, file line 273

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Wildcards also fail, but less spectacularly, with other Fossil commands:

Fossil 1.24:
>fossil add gui\forms.*
fossil: not found:

Fossil 1.23:
>fossil-123 add gui\forms.*
ADDED
ADDED

Thanks
Mark.

Working now for MinGW.  Need to fix the parse_windows_command_line() function
to do wildcard expansion in order to fix the problem for non-mingw windows
compilers.

Note: Mingw is the only toolset which does command line expansion in crt0, mingw-w64 and msvc do not. It is really a problem of the Windows console: Shells are supposed to do their own command line expansion. Cygwin and Msys do that, but the Windows console does not do that. Therefore the mingw people decided to build it into crt0, but it makes mingw incompatible with msvc.
<p>
Unfortunately, mingw doesn't have an unicode-aware crt0, that would solve everything. Mingw-w64 and msvc have it, but those don't do command line expansion.
<p>
I would recommend to build command line expansion into fossil. It would make command line expansion available to mingw-w64 and msvc builds on the Windows console as well. The risk is that when using Msys or Cygwin, the command line
expansion is done twice, I don't know exactly what possible problems that could give.

So, the easiest workaround would be: use the Msys or Cygwin or any other shell, just not the Windows console.

Maybe the right thing to do is add a new "fossil glob CMD ARG1 ARG2 ...." command.  The glob command applies file globing to all arguments, then runs CMD with the globed arguments.  This is similar to how the "glob" command worked in very early Unix systems, before globing got built into the shell.

Unix, Msys, and cygwin shells would continue to operate normally.  Users on a windows shell, however, would need to add the "glob" keyword if they want globing to occur in their command.

Hi,

I'm not sure if it's been mentioned before, but msvc does support expanding command-line wildcards into separate argv strings:


Mark.