forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
MSYS2 Notes
dscho edited this page Mar 3, 2015
·
10 revisions
Page for things that pop up while fiddling with MSys2.
-
PS1 script: I had to replace
PS1="$PS1"'\n'
withPS1="$PS1"$'\n'
within theprofile
file to get the git prompt working. See also this msys2 ticket page -
When trying to debug environment issues, it can be very helpful to print out the environment as it comes into Git. Unfortunately,
mingw_startup()
– which converts the environment to UTF-8 – is run so early that thesprintf()
family of functions does not work: the locale has not been initialized yet (because this would require the environment, using theLC_ALL
environment variable!). Therefore, something like this is required:
#include <strsafe.h>
...
{
char buffer[1024];
StringCbPrintf(buffer, sizeof(buffer), "env %d is '%s'\n", i, environ[i]);
write(2, buffer, strlen(buffer));
}
This wiki page has been retired. All it did was to point to Git for Windows' governance model.