{"thread":{"id":"36835","subject":"[PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","startedAt":"2014-06-04T11:47:30Z","lastAt":"2014-06-06T19:26:03Z","messageCount":31,"participants":["Stepan Kasal","Duy Nguyen","Erik Faye-Lund","Karsten Blees","Johannes Schindelin","Torsten Bögershausen","Philip Oakley","Sebastian Schuberth"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"243284","messageId":"20140604114730.GB22250@camelia.ucw.cz","threadId":"36835","inReplyTo":null,"subject":"[PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-06-04T11:47:30Z","receivedAt":"2014-06-04T11:47:30Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\nDate: Wed, 2 Jun 2010 00:41:33 +0200\n\nIf HOME is not set, use $HOMEDRIVE/$HOMEPATH\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\nHi,\n   this patch is present in msysGit for 4 years.\nStepan\n\n compat/mingw.c    | 18 ++++++++++++++++++\n compat/mingw.h    |  3 +++\n git-compat-util.h |  4 ++++\n path.c            |  4 ++--\n shell.c           |  2 +-\n 5 files changed, 28 insertions(+), 3 deletions(-)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex a0e13bc..8eb21dc 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -1847,3 +1847,21 @@ int mingw_offset_1st_component(const char *path)\n \n \treturn offset + is_dir_sep(path[offset]);\n }\n+\n+const char *get_windows_home_directory(void)\n+{\n+\tstatic const char *home_directory = NULL;\n+\tstruct strbuf buf = STRBUF_INIT;\n+\n+\tif (home_directory)\n+\t\treturn home_directory;\n+\n+\thome_directory = getenv(\"HOME\");\n+\tif (home_directory && *home_directory)\n+\t\treturn home_directory;\n+\n+\tstrbuf_addf(&buf, \"%s/%s\", getenv(\"HOMEDRIVE\"), getenv(\"HOMEPATH\"));\n+\thome_directory = strbuf_detach(&buf, NULL);\n+\n+\treturn home_directory;\n+}\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex 3eaf822..a88a7ab 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -386,3 +386,6 @@ static int mingw_main(c,v)\n  * Used by Pthread API implementation for Windows\n  */\n extern int err_win_to_posix(DWORD winerr);\n+\n+extern const char *get_windows_home_directory();\n+#define get_home_directory() get_windows_home_directory()\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex b6f03b3..409e644 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -740,4 +740,8 @@ struct tm *git_gmtime_r(const time_t *, struct tm *);\n #define gmtime_r git_gmtime_r\n #endif\n \n+#ifndef get_home_directory\n+#define get_home_directory() getenv(\"HOME\")\n+#endif\n+\n #endif\ndiff --git a/path.c b/path.c\nindex bc804a3..09b362c 100644\n--- a/path.c\n+++ b/path.c\n@@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...)\n void home_config_paths(char **global, char **xdg, char *file)\n {\n \tchar *xdg_home = getenv(\"XDG_CONFIG_HOME\");\n-\tchar *home = getenv(\"HOME\");\n+\tconst char *home = get_home_directory();\n \tchar *to_free = NULL;\n \n \tif (!home) {\n@@ -274,7 +274,7 @@ char *expand_user_path(const char *path)\n \t\tconst char *username = path + 1;\n \t\tsize_t username_len = first_slash - username;\n \t\tif (username_len == 0) {\n-\t\t\tconst char *home = getenv(\"HOME\");\n+\t\t\tconst char *home = get_home_directory();\n \t\t\tif (!home)\n \t\t\t\tgoto return_null;\n \t\t\tstrbuf_add(&user_path, home, strlen(home));\ndiff --git a/shell.c b/shell.c\nindex 5c0d47a..edd8c3a 100644\n--- a/shell.c\n+++ b/shell.c\n@@ -55,7 +55,7 @@ static char *make_cmd(const char *prog)\n \n static void cd_to_homedir(void)\n {\n-\tconst char *home = getenv(\"HOME\");\n+\tconst char *home = get_home_directory();\n \tif (!home)\n \t\tdie(\"could not determine user's home directory; HOME is unset\");\n \tif (chdir(home) == -1)\n-- \n1.9.2.msysgit.0.655.g1a42564\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243288","messageId":"CACsJy8BDk4gdRzjp_XpQXXMW1sEnS4DoedanFLONODuJXdeeRA@mail.gmail.com","threadId":"36835","inReplyTo":"20140604114730.GB22250@camelia.ucw.cz","subject":"Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2014-06-04T13:47:58Z","receivedAt":"2014-06-04T13:47:58Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal <kasal@ucw.cz> wrote:\n> @@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...)\n>  void home_config_paths(char **global, char **xdg, char *file)\n>  {\n>         char *xdg_home = getenv(\"XDG_CONFIG_HOME\");\n> -       char *home = getenv(\"HOME\");\n> +       const char *home = get_home_directory();\n>         char *to_free = NULL;\n>\n>         if (!home) {\n\nJust checking. Instead of replace the call sites, can we check and\nsetenv(\"HOME\") if it's missing instead? MinGW port already replaces\nmain(). Extra initialization should not be a problem. I feel\n\"getenv(\"HOME\")\" a tiny bit more familiar than get_home_directory(),\nbut that's really weak argument as the number of call sites has not\nincreased in 4 years.\n-- \nDuy\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243290","messageId":"CABPQNSYXsu1muRTVUg6ybB9_MJP_wJi-4PmSec+8EwrvsCHMRw@mail.gmail.com","threadId":"36835","inReplyTo":"CACsJy8BDk4gdRzjp_XpQXXMW1sEnS4DoedanFLONODuJXdeeRA@mail.gmail.com","subject":"Re: Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2014-06-04T14:05:58Z","receivedAt":"2014-06-04T14:05:58Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Wed, Jun 4, 2014 at 3:47 PM, Duy Nguyen <pclouds@gmail.com> wrote:\n> On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal <kasal@ucw.cz> wrote:\n>> @@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...)\n>>  void home_config_paths(char **global, char **xdg, char *file)\n>>  {\n>>         char *xdg_home = getenv(\"XDG_CONFIG_HOME\");\n>> -       char *home = getenv(\"HOME\");\n>> +       const char *home = get_home_directory();\n>>         char *to_free = NULL;\n>>\n>>         if (!home) {\n>\n> Just checking. Instead of replace the call sites, can we check and\n> setenv(\"HOME\") if it's missing instead? MinGW port already replaces\n> main(). Extra initialization should not be a problem. I feel\n> \"getenv(\"HOME\")\" a tiny bit more familiar than get_home_directory(),\n> but that's really weak argument as the number of call sites has not\n> increased in 4 years.\n\nYeah. But we already set %HOME% to %HOMEDRIVE%%HOMEPATH% in\n/etc/profile, git-cmd.bat, gitk.cmd *and* git-wrapper... Do we really\nneed one more place?\n\nIt seems some of these could be dropped...\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243294","messageId":"20140604145350.GA22681@camelia.ucw.cz","threadId":"36835","inReplyTo":"CACsJy8BDk4gdRzjp_XpQXXMW1sEnS4DoedanFLONODuJXdeeRA@mail.gmail.com","subject":"Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-06-04T14:53:50Z","receivedAt":"2014-06-04T14:53:50Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hello,\n\nOn Wed, Jun 04, 2014 at 08:47:58PM +0700, Duy Nguyen wrote:\n> setenv(\"HOME\") if it's missing instead? MinGW port already replaces\n> main(). Extra initialization should not be a problem.\n\nwell, I would be afraid to modify the environment for subprocesses.\nIt could hit back in certain situations, like with git filter-branch.\n\nWe could replace getenv() with a wrapper though.\nBut I don't think it's worth it.\n\n> I feel\n> \"getenv(\"HOME\")\" a tiny bit more familiar than get_home_directory(),\n> but that's really weak argument as the number of call sites has not\n> increased in 4 years.\n\nActually, the patch had to be updated when msysgit modifications were\nrebased.  But yes, the number of call sites has not icreased: it was\ncalled in four places back than, and it is called at three places\nnow.  There is only one that is in common, though.\n\nStepan\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243295","messageId":"538F3372.5070400@gmail.com","threadId":"36835","inReplyTo":"CABPQNSYXsu1muRTVUg6ybB9_MJP_wJi-4PmSec+8EwrvsCHMRw@mail.gmail.com","subject":"Re: Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-06-04T14:55:46Z","receivedAt":"2014-06-04T14:55:46Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"Am 04.06.2014 16:05, schrieb Erik Faye-Lund:\n> On Wed, Jun 4, 2014 at 3:47 PM, Duy Nguyen <pclouds@gmail.com> wrote:\n>> On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal <kasal@ucw.cz> wrote:\n>>> @@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...)\n>>>  void home_config_paths(char **global, char **xdg, char *file)\n>>>  {\n>>>         char *xdg_home = getenv(\"XDG_CONFIG_HOME\");\n>>> -       char *home = getenv(\"HOME\");\n>>> +       const char *home = get_home_directory();\n>>>         char *to_free = NULL;\n>>>\n>>>         if (!home) {\n>>\n>> Just checking. Instead of replace the call sites, can we check and\n>> setenv(\"HOME\") if it's missing instead? MinGW port already replaces\n>> main(). Extra initialization should not be a problem. I feel\n>> \"getenv(\"HOME\")\" a tiny bit more familiar than get_home_directory(),\n>> but that's really weak argument as the number of call sites has not\n>> increased in 4 years.\n> \n\nSetting the variable instead of wrapping getenv has the additional benefit that it also affects child processes (read: scripted commands).\n\n> Yeah. But we already set %HOME% to %HOMEDRIVE%%HOMEPATH% in\n> /etc/profile, git-cmd.bat, gitk.cmd *and* git-wrapper... Do we really\n> need one more place?\n> \n\n...all of these also do the string concatenation correctly (i.e. not \"C:/\\Users\\MyName\" as this patch does), fall back to %USERPROFILE% if %HOMEPATH% is not set, and most (except git-wrapper) even check that the directory exists. So IMO this patch has been superseded by more robust solutions and should be dropped.\n\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243298","messageId":"alpine.DEB.1.00.1406041711540.14982@s15462909.onlinehome-server.info","threadId":"36835","inReplyTo":"CACsJy8BDk4gdRzjp_XpQXXMW1sEnS4DoedanFLONODuJXdeeRA@mail.gmail.com","subject":"Re: Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-06-04T15:13:32Z","receivedAt":"2014-06-04T15:13:32Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Duy,\n\nOn Wed, 4 Jun 2014, Duy Nguyen wrote:\n\n> On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal <kasal@ucw.cz> wrote:\n> > @@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...)\n> >  void home_config_paths(char **global, char **xdg, char *file)\n> >  {\n> >         char *xdg_home = getenv(\"XDG_CONFIG_HOME\");\n> > -       char *home = getenv(\"HOME\");\n> > +       const char *home = get_home_directory();\n> >         char *to_free = NULL;\n> >\n> >         if (!home) {\n> \n> Just checking. Instead of replace the call sites, can we check and\n> setenv(\"HOME\") if it's missing instead? MinGW port already replaces\n> main(). Extra initialization should not be a problem. I feel\n> \"getenv(\"HOME\")\" a tiny bit more familiar than get_home_directory(),\n> but that's really weak argument as the number of call sites has not\n> increased in 4 years.\n\nThere is a good reason why we did not go for that (noticably cheaper)\nsolution. In fact, it used to be our solution until too many things got\nbroken by setting the HOME variable: Git is not the only program making\nuse of that variable (and IIRC Putty or a merge helper got seriously\nconfused when we set it).\n\nSo I am afraid, no, we cannot simply setenv(HOME).\n\nCiao,\nJohannes\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243299","messageId":"alpine.DEB.1.00.1406041713500.14982@s15462909.onlinehome-server.info","threadId":"36835","inReplyTo":"CABPQNSYXsu1muRTVUg6ybB9_MJP_wJi-4PmSec+8EwrvsCHMRw@mail.gmail.com","subject":"Re: Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-06-04T15:14:34Z","receivedAt":"2014-06-04T15:14:34Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Erik,\n\nOn Wed, 4 Jun 2014, Erik Faye-Lund wrote:\n\n> On Wed, Jun 4, 2014 at 3:47 PM, Duy Nguyen <pclouds@gmail.com> wrote:\n> > On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal <kasal@ucw.cz> wrote:\n> >> @@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...)\n> >>  void home_config_paths(char **global, char **xdg, char *file)\n> >>  {\n> >>         char *xdg_home = getenv(\"XDG_CONFIG_HOME\");\n> >> -       char *home = getenv(\"HOME\");\n> >> +       const char *home = get_home_directory();\n> >>         char *to_free = NULL;\n> >>\n> >>         if (!home) {\n> >\n> > Just checking. Instead of replace the call sites, can we check and\n> > setenv(\"HOME\") if it's missing instead? MinGW port already replaces\n> > main(). Extra initialization should not be a problem. I feel\n> > \"getenv(\"HOME\")\" a tiny bit more familiar than get_home_directory(),\n> > but that's really weak argument as the number of call sites has not\n> > increased in 4 years.\n> \n> Yeah. But we already set %HOME% to %HOMEDRIVE%%HOMEPATH% in\n> /etc/profile, git-cmd.bat, gitk.cmd *and* git-wrapper... Do we really\n> need one more place?\n> \n> It seems some of these could be dropped...\n\nNo. Git is not always called through Bash or the git-wrapper,\nunfortunately.\n\nCiao,\nDscho\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243300","messageId":"CABPQNSavYCrdUDyNru-HHMFkdgDRvaCp++f8ZgGKv07sS0eXGQ@mail.gmail.com","threadId":"36835","inReplyTo":"alpine.DEB.1.00.1406041713500.14982@s15462909.onlinehome-server.info","subject":"Re: Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2014-06-04T15:18:52Z","receivedAt":"2014-06-04T15:18:52Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Wed, Jun 4, 2014 at 5:14 PM, Johannes Schindelin\n<Johannes.Schindelin@gmx.de> wrote:\n> Hi Erik,\n>\n> On Wed, 4 Jun 2014, Erik Faye-Lund wrote:\n>\n>> On Wed, Jun 4, 2014 at 3:47 PM, Duy Nguyen <pclouds@gmail.com> wrote:\n>> > On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal <kasal@ucw.cz> wrote:\n>> >> @@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...)\n>> >>  void home_config_paths(char **global, char **xdg, char *file)\n>> >>  {\n>> >>         char *xdg_home = getenv(\"XDG_CONFIG_HOME\");\n>> >> -       char *home = getenv(\"HOME\");\n>> >> +       const char *home = get_home_directory();\n>> >>         char *to_free = NULL;\n>> >>\n>> >>         if (!home) {\n>> >\n>> > Just checking. Instead of replace the call sites, can we check and\n>> > setenv(\"HOME\") if it's missing instead? MinGW port already replaces\n>> > main(). Extra initialization should not be a problem. I feel\n>> > \"getenv(\"HOME\")\" a tiny bit more familiar than get_home_directory(),\n>> > but that's really weak argument as the number of call sites has not\n>> > increased in 4 years.\n>>\n>> Yeah. But we already set %HOME% to %HOMEDRIVE%%HOMEPATH% in\n>> /etc/profile, git-cmd.bat, gitk.cmd *and* git-wrapper... Do we really\n>> need one more place?\n>>\n>> It seems some of these could be dropped...\n>\n> No. Git is not always called through Bash or the git-wrapper,\n> unfortunately.\n\nI'm aware of that. But you said in a previous e-mail that e.g putty\ngot confused when we set HOME. How is this a problem for git.exe, but\nnot when we set it in the shell?\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243301","messageId":"alpine.DEB.1.00.1406041725460.14982@s15462909.onlinehome-server.info","threadId":"36835","inReplyTo":"CABPQNSavYCrdUDyNru-HHMFkdgDRvaCp++f8ZgGKv07sS0eXGQ@mail.gmail.com","subject":"Re: Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-06-04T15:27:07Z","receivedAt":"2014-06-04T15:27:07Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi kusma,\n\nOn Wed, 4 Jun 2014, Erik Faye-Lund wrote:\n\n> On Wed, Jun 4, 2014 at 5:14 PM, Johannes Schindelin\n> <Johannes.Schindelin@gmx.de> wrote:\n> >\n> > On Wed, 4 Jun 2014, Erik Faye-Lund wrote:\n> >\n> >> On Wed, Jun 4, 2014 at 3:47 PM, Duy Nguyen <pclouds@gmail.com> wrote:\n> >> > On Wed, Jun 4, 2014 at 6:47 PM, Stepan Kasal <kasal@ucw.cz> wrote:\n> >> >> @@ -133,7 +133,7 @@ char *git_path(const char *fmt, ...)\n> >> >>  void home_config_paths(char **global, char **xdg, char *file)\n> >> >>  {\n> >> >>         char *xdg_home = getenv(\"XDG_CONFIG_HOME\");\n> >> >> -       char *home = getenv(\"HOME\");\n> >> >> +       const char *home = get_home_directory();\n> >> >>         char *to_free = NULL;\n> >> >>\n> >> >>         if (!home) {\n> >> >\n> >> > Just checking. Instead of replace the call sites, can we check and\n> >> > setenv(\"HOME\") if it's missing instead? MinGW port already replaces\n> >> > main(). Extra initialization should not be a problem. I feel\n> >> > \"getenv(\"HOME\")\" a tiny bit more familiar than\n> >> > get_home_directory(), but that's really weak argument as the number\n> >> > of call sites has not increased in 4 years.\n> >>\n> >> Yeah. But we already set %HOME% to %HOMEDRIVE%%HOMEPATH% in\n> >> /etc/profile, git-cmd.bat, gitk.cmd *and* git-wrapper... Do we really\n> >> need one more place?\n> >>\n> >> It seems some of these could be dropped...\n> >\n> > No. Git is not always called through Bash or the git-wrapper,\n> > unfortunately.\n> \n> I'm aware of that. But you said in a previous e-mail that e.g putty got\n> confused when we set HOME. How is this a problem for git.exe, but not\n> when we set it in the shell?\n\nThe problem arises whenever git.exe calls subprocesses. You can pollute\nthe environment by setting HOME, I do not recall the details, but I\nremember that we had to be very careful *not* to do that, hence the patch.\nSorry, has been a long time.\n\nCiao,\nDscho\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243302","messageId":"20140604154503.GB22681@camelia.ucw.cz","threadId":"36835","inReplyTo":"alpine.DEB.1.00.1406041725460.14982@s15462909.onlinehome-server.info","subject":"Re: Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-06-04T15:45:03Z","receivedAt":"2014-06-04T15:45:03Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hi dscho,\n\n> > On Wed, Jun 4, 2014 at 5:14 PM, Johannes Schindelin\n> > <Johannes.Schindelin@gmx.de> wrote:\n> > > No. Git is not always called through Bash or the git-wrapper,\n> > > unfortunately.\n\nbut you have to admit, that in most cases it is called through bash\nor the git wrapper.\n\n> The problem arises whenever git.exe calls subprocesses. You can pollute\n> the environment by setting HOME, I do not recall the details, but I\n> remember that we had to be very careful *not* to do that, hence the patch.\n> Sorry, has been a long time.\n\nYeah, memories.  Is this experience still valid?  How many users do\nprofit from this, using c:/Program\\ Files \\(86\\)/bin/git.exe instead of \nc:/Program\\ Files \\(86\\)/cmd/git.exe, either by pure luck or\nintentionally?\n\nIt seems that we should keep the patch, to minimize surprise if\nbin/git.exe is used directly.\n\nBut we should probably make it consistent with other places:\n- $HOMEDRIVE$HOMEPATH (without the slash)\n- $USERPROFILE if the above dir does not exist.\n- setenv HOME instead of wrapper\n\nWe can make this change for msysGit 2.0.0 only, so that we do not\nbreak 1.9.4 ;-)\n\nDoes this make sense?\n\tStepan\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243303","messageId":"alpine.DEB.1.00.1406041741470.14982@s15462909.onlinehome-server.info","threadId":"36835","inReplyTo":"alpine.DEB.1.00.1406041725460.14982@s15462909.onlinehome-server.info","subject":"Re: Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-06-04T15:46:54Z","receivedAt":"2014-06-04T15:46:54Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi kusma,\n\nOn Wed, 4 Jun 2014, Johannes Schindelin wrote:\n\n> The problem arises whenever git.exe calls subprocesses. You can pollute\n> the environment by setting HOME, I do not recall the details, but I\n> remember that we had to be very careful *not* to do that, hence the patch.\n> Sorry, has been a long time.\n\nActually, a quick search in my Applegate vaults^W^Wmail archives suggests\nthat we had tons of troubles with non-ASCII characters in the path.\n\nGiven that none of us really has time to recreate the problems, or to take\ncare of them if there arises a new problem due to setting the HOME\nvariable again (remember: while we have UTF-8 support in Git, thanks to\nKarsten's tireless efforts, and while that seems to fix the biggest bugs\nfor us, other MinGW software does not have that luxury and will continue\nto barf on non-ASCII characters in the HOME variable), I would be strongly\nin favor of fixing the problem by the root: avoiding to have Git rely on\nthe HOME environment variable to be set, but instead add a clean API call\nthat even says what it is supposed to do: gimme the user's home\ndirectory's path. And that is exactly what the patch does.\n\nCiao,\nDscho\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243304","messageId":"alpine.DEB.1.00.1406041749590.14982@s15462909.onlinehome-server.info","threadId":"36835","inReplyTo":"20140604154503.GB22681@camelia.ucw.cz","subject":"Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-06-04T15:56:23Z","receivedAt":"2014-06-04T15:56:23Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Stepan,\n\nOn Wed, 4 Jun 2014, Stepan Kasal wrote:\n\n> > > On Wed, Jun 4, 2014 at 5:14 PM, Johannes Schindelin\n> > > <Johannes.Schindelin@gmx.de> wrote:\n> > > > No. Git is not always called through Bash or the git-wrapper,\n> > > > unfortunately.\n> \n> but you have to admit, that in most cases it is called through bash or\n> the git wrapper.\n\nIt would seem so. But the plan was always to make the user experience on\nWindows less abysmal than now (I just do not have enough time these days\nto pursue that goal myself), which includes the goal to make git.exe the\nmain entrance point, not Bash nor the git-wrapper.\n\n> > The problem arises whenever git.exe calls subprocesses. You can pollute\n> > the environment by setting HOME, I do not recall the details, but I\n> > remember that we had to be very careful *not* to do that, hence the patch.\n> > Sorry, has been a long time.\n> \n> Yeah, memories.\n\n*Very* vague. Sorry.\n\n> Is this experience still valid?  How many users do profit from this,\n> using c:/Program\\ Files \\(86\\)/bin/git.exe instead of c:/Program\\ Files\n> \\(86\\)/cmd/git.exe, either by pure luck or intentionally?\n\nKeep in mind that the most problems were introduced by the fact that\nUSERPROFILE disagrees with HOMEDRIVE\\HOMEPATH at times.\n\n> It seems that we should keep the patch, to minimize surprise if\n> bin/git.exe is used directly.\n\nI am also in favor of keeping the patch because it introduces a bit of\ndocumentation. It says pretty precisely what it wants and allows\nplatform-specific handling without having to play games with the\nenvironment, as was suggested earlier.\n\nAnd of course you cannot deny that it had four years of testing. The HOME\nproblems never came back after we included this patch.\n\n> But we should probably make it consistent with other places:\n> - $HOMEDRIVE$HOMEPATH (without the slash)\n> - $USERPROFILE if the above dir does not exist.\n> - setenv HOME instead of wrapper\n\nPossibly. But again, it is hard to argue with four years of testing. Any\nchange you make now will lack that kind of vetting.\n\n> We can make this change for msysGit 2.0.0 only, so that we do not\n> break 1.9.4 ;-)\n\nSo we can break 2.0.0! ;-)\n\nActually, 2.0.0 for Windows needs to wait a little longer (it is a little\nbit unfortunate that we could not coordinate it with upstream) because the\nplan is to switch to mingwGitDevEnv for said release. No more msysGit.\nLike, bu-bye. Thanks for all the fish.\n\nCiao,\nDscho\n"},{"id":"243307","messageId":"20140604161625.GB23226@camelia.ucw.cz","threadId":"36835","inReplyTo":"alpine.DEB.1.00.1406041749590.14982@s15462909.onlinehome-server.info","subject":"Re: Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-06-04T16:16:25Z","receivedAt":"2014-06-04T16:16:25Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hi dscho,\n\nyour arguments seem really strong.  (Especially the four years of\nbattle testing, with the memories of constant problems with HOME before.)\n\nI hope they are strong enough to convince Junio to accept this patch;\nthat would help.\n\nStepan\n\nPS (about mingwGitDevEnv):\n> plan is to switch to mingwGitDevEnv for said release. No more msysGit.\n> Like, bu-bye. Thanks for all the fish.\n\nInteresting.\n\nWith msysgit, there is the \"net installer\" - first time I installed\nmsys/mingw sucessfully, it was as easy as Cygwin, perhaps even\neasier.\n\nWhen I go to mingwGitDevEnv home page, I read about chickens, eggs,\nand upgrading Perl (which msysGit simply gives up, hinting that it is\nalmost impossible).\nSo I decided to wait for their Git 2.0.0 release before I try to\ninstall it (again).\n\nI apologize for being so cheeky, I hope it will help anyway...\n\nPPS: from marketing point of view, mingwGitDevEnv is far from usable\nname.  Dscho, if you support the idea, would you mind franchising\nmsysGit 2.0 for a decent amount?\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243311","messageId":"alpine.DEB.1.00.1406041946510.14982@s15462909.onlinehome-server.info","threadId":"36835","inReplyTo":"20140604161625.GB23226@camelia.ucw.cz","subject":"Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-06-04T17:49:42Z","receivedAt":"2014-06-04T17:49:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Stepan,\n\nOn Wed, 4 Jun 2014, Stepan Kasal wrote:\n\n> PS (about mingwGitDevEnv):\n> > plan is to switch to mingwGitDevEnv for said release. No more msysGit.\n> > Like, bu-bye. Thanks for all the fish.\n> \n> Interesting.\n> \n> With msysgit, there is the \"net installer\" - first time I installed\n> msys/mingw sucessfully, it was as easy as Cygwin, perhaps even\n> easier.\n> \n> When I go to mingwGitDevEnv home page, I read about chickens, eggs, and\n> upgrading Perl (which msysGit simply gives up, hinting that it is almost\n> impossible).  So I decided to wait for their Git 2.0.0 release before I\n> try to install it (again).\n\nI understand. And now that upstream Git 2.0.0 is out, it will be very hard\nto use that as a deadline to push against. So: don't hold your breath.\n\n> PPS: from marketing point of view, mingwGitDevEnv is far from usable\n> name.  Dscho, if you support the idea, would you mind franchising\n> msysGit 2.0 for a decent amount?\n\nMake me an offer :-P\n\nSeriously again, I am in favor of calling it the Git for Windows SDK. But\nreally, it is bikeshedding at this point. There is real work to do, still,\nbefore we can switch. Lots of unaddressed questions. Too little time.\nSpeaking of which... budget's depleted for today ;-)\n\nCiao,\nDscho\n"},{"id":"243359","messageId":"CACsJy8Bz_cvF-AQyVKF7yqu9PArH7cV2Va_t=-bM-DGtGu8tpA@mail.gmail.com","threadId":"36835","inReplyTo":"20140604161625.GB23226@camelia.ucw.cz","subject":"Re: Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2014-06-04T23:10:43Z","receivedAt":"2014-06-04T23:10:43Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Wed, Jun 4, 2014 at 11:16 PM, Stepan Kasal <kasal@ucw.cz> wrote:\n> Hi dscho,\n>\n> your arguments seem really strong.  (Especially the four years of\n> battle testing, with the memories of constant problems with HOME before.)\n>\n> I hope they are strong enough to convince Junio to accept this patch;\n> that would help.\n\nI think you should include the problems Dscho described in the commit\nmessage too.\n-- \nDuy\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243360","messageId":"538FCAF5.7030102@gmail.com","threadId":"36835","inReplyTo":"alpine.DEB.1.00.1406041741470.14982@s15462909.onlinehome-server.info","subject":"Re: Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-06-05T01:42:13Z","receivedAt":"2014-06-05T01:42:13Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"Am 04.06.2014 17:46, schrieb Johannes Schindelin:\n> Hi kusma,\n> \n> On Wed, 4 Jun 2014, Johannes Schindelin wrote:\n> \n>> The problem arises whenever git.exe calls subprocesses. You can pollute\n>> the environment by setting HOME, I do not recall the details, but I\n>> remember that we had to be very careful *not* to do that, hence the patch.\n>> Sorry, has been a long time.\n> \n> Actually, a quick search in my Applegate vaults^W^Wmail archives suggests\n> that we had tons of troubles with non-ASCII characters in the path.\n> \n\nAfter a bit of digging in the history and the old googlegroups issue tracker, I think this patch is completely unrelated to the non-ASCII problems.\n\nIn summary, this patch fixes 'git config' for the portable version only, and it only does so partially. Thus I don't think its ready for upstream, at least not in its current form. See below for the nasty details.\n\n\n> I would be strongly\n> in favor of fixing the problem by the root: avoiding to have Git rely on\n> the HOME environment variable to be set, but instead add a clean API call\n> that even says what it is supposed to do: gimme the user's home\n> directory's path. And that is exactly what the patch does.\n> \n\nBy that argument we'd have to introduce API abstractions for every environment variable that could possibly resemble a path (PATH, TMPDIR, GIT_DIR, GIT_WORK_DIR, GIT_TRACE* etc.).\n\nWe already have similar fallback logic for TMPDIR that is completely non-intrusive to core git code (fully encapsulated in mingw.c, see mingw_getenv (upstream) or mingw_startup (msysgit)). IMO such a solution would be hugely preferable over adding an additional get_home_directory() API (and continuously checking that no new upstream code accidentally introduces another 'getenv(\"HOME\")').\n\nCheers,\nKarsten\n\n====\n\n\nAnalysis of $HOME-realted issues:\n\n\n1. mangled non-ASCII characters in environment variables\n\nE.g. issue 491 [1], reportedly fixed in v1.7.10 ([1] comment #10).\n\nThis is actually a bug in msys.dll, and there's nothing that can be done about it from within git.exe. It is also not a problem if git is launched from cmd.exe.\n\nThe root cause is that the msys environment is initialized using GetEnvironmentStringsA(), which returns GetOEMCP()-encoded strings (e.g. cp850), rather than GetACP() (e.g. cp1252) as all other *A API functions do [2]. This adds one level of mangling whenever a native Windows program starts an msys program (so e.g. the call chain bash->git->bash->wish would mangle twice, see [1] comment #3).\n\nFor the fixed GetEnvironmentStringsA(), see [3] lines 459ff.\n\n(As a side note, $HOMEDRIVE and $HOMEPATH originally did not have this problem, as they were separately initialized from NetUserGetInfoA(). This was changed in v1.6.3, however, at that time etc/profile was still using the broken $USERPROFILE. See [4], [5].)\n\n\n2. 'git config' doesn't work with disconnected network drives\n\nIssues 259 [6], 497 [7] and 512 [8], fixed in v1.7.0.2 for bash and v1.7.2.3 for cmd.\n\nApparently, $HOMEDRIVE$HOMEPATH is the home directory on the network, and $USERPROFILE is local. To be able to work offline, we need to check if $HOMEDRIVE$HOMEPATH exists and fall back to $USERPROFILE otherwise.\n\nNote that git-wrapper does _not_ check if $HOMEDRIVE$HOMEPATH actually exists, as the original git.cmd did. This is probably a regression wrt issue 259.\n\n\n3. HOME is not set when using the portable version\n\nIssue 482 [9], partially fixed in v1.7.2.3 by this patch.\n\n'Partially' because:\n- there's no fallback to $USERPROFILE, so it doesn't work with disconnected network drives (see problem 2.)\n- it doesn't setenv(HOME) for child processes (at least git-gui accesses $env(HOME) directly, but I haven't checked what happens if HOME is not set)\n\nIncidentally, this patch was first released with v1.7.2.3, which also sets $HOME correctly in both etc/profile and git.cmd. So I suspect that this patch has always been essentially dead code (except perhaps for the portable version, I've never used that).\n\n\n[1] https://code.google.com/p/msysgit/issues/detail?id=491\n[2] http://msdn.microsoft.com/en-us/library/windows/desktop/ms683187%28v=vs.85%29.aspx\n[3] https://github.com/msysgit/msysgit/blob/msys/src/rt/patches/0013-msys.dll-basic-Unicode-support.patch\n[4] https://github.com/msysgit/msysgit/blob/msys/src/rt/patches/0007-only-override-the-variables-HOMEPATH-and-HOMEDRIVE-i.patch\n[5] https://github.com/msysgit/msysgit/commit/6b096c9\n[6] https://code.google.com/p/msysgit/issues/detail?id=259\n[7] https://code.google.com/p/msysgit/issues/detail?id=497\n[8] https://code.google.com/p/msysgit/issues/detail?id=512\n[9] https://code.google.com/p/msysgit/issues/detail?id=482\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243380","messageId":"20140605080317.GA28029@camelia.ucw.cz","threadId":"36835","inReplyTo":"538FCAF5.7030102@gmail.com","subject":"[PATCH v2] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-06-05T08:03:17Z","receivedAt":"2014-06-05T08:03:17Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\nDate: Wed, 2 Jun 2010 00:41:33 +0200\n\nIf HOME is not set, use $HOMEDRIVE$HOMEPATH\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n\nHello Karsten,\nthanks for your explanation.  There are more things to be done, but\nI hope you can ack this patch as a step forward.\n\nHello Dscho,\nI hope you can ack this as well: it is basically equivalent with your\npatch, tailored according to current upstream fashion,  ;-)\n\nStepan\n\n compat/mingw.c | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex a0e13bc..e108388 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -1181,6 +1181,11 @@ char *mingw_getenv(const char *name)\n \t\tif (!result)\n \t\t\tresult = getenv_cs(\"TEMP\");\n \t}\n+\tif (!result && !strcmp(name, \"HOME\")) {\n+\t\tstruct strbuf buf = STRBUF_INIT;\n+\t\tstrbuf_addf(&buf, \"%s%s\", getenv_cs(\"HOMEDRIVE\"), getenv_cs(\"HOMEPATH\"));\n+\t\tresult = strbuf_detach(&buf, NULL);\n+\t}\n \treturn result;\n }\n \n-- \n2.0.0.9635.g0be03cb\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243383","messageId":"53902B2C.7050807@web.de","threadId":"36835","inReplyTo":"20140605080317.GA28029@camelia.ucw.cz","subject":"Re: [msysGit] [PATCH v2] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2014-06-05T08:32:44Z","receivedAt":"2014-06-05T08:32:44Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2014-06-05 10.03, Stepan Kasal wrote:\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> Date: Wed, 2 Jun 2010 00:41:33 +0200\n> \n> If HOME is not set, use $HOMEDRIVE$HOMEPATH\n> \n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n> ---\n> \n> Hello Karsten,\n> thanks for your explanation.  There are more things to be done, but\n> I hope you can ack this patch as a step forward.\n> \n> Hello Dscho,\n> I hope you can ack this as well: it is basically equivalent with your\n> patch, tailored according to current upstream fashion,  ;-)\n> \n> Stepan\n> \n>  compat/mingw.c | 5 +++++\n>  1 file changed, 5 insertions(+)\n> \n> diff --git a/compat/mingw.c b/compat/mingw.c\n> index a0e13bc..e108388 100644\n> --- a/compat/mingw.c\n> +++ b/compat/mingw.c\n> @@ -1181,6 +1181,11 @@ char *mingw_getenv(const char *name)\n>  \t\tif (!result)\n>  \t\t\tresult = getenv_cs(\"TEMP\");\n>  \t}\n> +\tif (!result && !strcmp(name, \"HOME\")) {\n> +\t\tstruct strbuf buf = STRBUF_INIT;\n> +\t\tstrbuf_addf(&buf, \"%s%s\", getenv_cs(\"HOMEDRIVE\"), getenv_cs(\"HOMEPATH\"));\nshould we have a NULL pointer check here?\nWhat happens if %HOMEPATH% is not set for any reason ?\ngetenv_cs will return NULL, and strbuf_addf() does not like that, as far as I know.\nAnd even if it converts a NULL pointer into \"<NULL>\" or \"NULL\", the result is not what we want.\nIf HOMEDRIVE is set, but not HOMEPATH, we can fall back into the root of HOMEDRIVE:\n\n\tif (!result && !strcmp(name, \"HOME\")) {\n\t\tconst char *homedrive = getenv_cs(\"HOMEDRIVE\");\n\t\tconst char *homepath = getenv_cs(\"HOMEPATH\");\n\t\tif (!homepath)\n\t\t\thomepath = \"\";\n        \tif (homedrive) {\n\t\t\tstruct strbuf buf = STRBUF_INIT;\n\t\t\tstrbuf_addf(&buf, \"%s%s\", homedrive, homepath);\n\t\t\tresult = strbuf_detach(&buf, NULL);\n\t\t}\n\t}\n\treturn result;\n}  \n \n"},{"id":"243384","messageId":"53903B22.70507@gmail.com","threadId":"36835","inReplyTo":"20140605080317.GA28029@camelia.ucw.cz","subject":"Re: [PATCH v2] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-06-05T09:40:50Z","receivedAt":"2014-06-05T09:40:50Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"Am 05.06.2014 10:03, schrieb Stepan Kasal:\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> Date: Wed, 2 Jun 2010 00:41:33 +0200\n> \n> If HOME is not set, use $HOMEDRIVE$HOMEPATH\n> \n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n> ---\n> \n> Hello Karsten,\n> thanks for your explanation.  There are more things to be done, but\n> I hope you can ack this patch as a step forward.\n> \n\nNo, not really. Its sure better than introducing a special get_home_directory(), but it still increases the diff between upstream and msysgit rather than reducing it. The main critique points still remain:\n\n * $HOME is usually set up correctly before calling git, so this is essentially dead code (just checked, portable git's git-bash.bat and git-cmd.bat also do this correctly)\n\n * even if $HOME was empty, git should setenv(\"HOME\") so that child processes can benefit from it (similar to TMPDIR and TERM in current msysgit's mingw_startup()). Not setting $HOME because it may hypothetically break child processes is a very weak argument, as we always did set $HOME in etc/profile (since the initial version back in 2007).\n\n * no fallback to $USERPROFILE doesn't work with diconnected home share\n\nIf you really have time to spare, I suggest you focus on getting the Unicode patches upstream so that we can progress from there (e.g. move $HOME setup to mingw_startup() so that we can get rid of redundant logic in etc/profile, git-wrapper, git-bash.bat, git-cmd.bat etc.).\n\n> Hello Dscho,\n> I hope you can ack this as well: it is basically equivalent with your\n> patch, tailored according to current upstream fashion,  ;-)\n> \n> Stepan\n> \n>  compat/mingw.c | 5 +++++\n>  1 file changed, 5 insertions(+)\n> \n> diff --git a/compat/mingw.c b/compat/mingw.c\n> index a0e13bc..e108388 100644\n> --- a/compat/mingw.c\n> +++ b/compat/mingw.c\n> @@ -1181,6 +1181,11 @@ char *mingw_getenv(const char *name)\n>  \t\tif (!result)\n>  \t\t\tresult = getenv_cs(\"TEMP\");\n>  \t}\n\nelse?\n\n> +\tif (!result && !strcmp(name, \"HOME\")) {\n> +\t\tstruct strbuf buf = STRBUF_INIT;\n> +\t\tstrbuf_addf(&buf, \"%s%s\", getenv_cs(\"HOMEDRIVE\"), getenv_cs(\"HOMEPATH\"));\n\nNo surplus '/', good!\n\n> +\t\tresult = strbuf_detach(&buf, NULL);\n\nThis leaks memory.\n\n> +\t}\n>  \treturn result;\n>  }\n>  \n> \n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243385","messageId":"CABPQNSYtxLyWkRGOyst7VOpw-_=rQvKF_VsbDB7Y0-K=d9rvkQ@mail.gmail.com","threadId":"36835","inReplyTo":"53903B22.70507@gmail.com","subject":"Re: [PATCH v2] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2014-06-05T09:58:33Z","receivedAt":"2014-06-05T09:58:33Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Thu, Jun 5, 2014 at 11:40 AM, Karsten Blees <karsten.blees@gmail.com> wrote:\n> Am 05.06.2014 10:03, schrieb Stepan Kasal:\n>> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> Date: Wed, 2 Jun 2010 00:41:33 +0200\n>>\n>> If HOME is not set, use $HOMEDRIVE$HOMEPATH\n>>\n>> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n>> ---\n>>\n>> Hello Karsten,\n>> thanks for your explanation.  There are more things to be done, but\n>> I hope you can ack this patch as a step forward.\n>>\n>\n> No, not really. Its sure better than introducing a special get_home_directory(), but it still increases the diff between upstream and msysgit rather than reducing it. The main critique points still remain:\n>\n>  * $HOME is usually set up correctly before calling git, so this is essentially dead code (just checked, portable git's git-bash.bat and git-cmd.bat also do this correctly)\n\nWhat about when tools like TortoiseGit and Git Extensions call git?\nWe're not guaranteed that they did the $HOME-dance, are we?\n\n>  * even if $HOME was empty, git should setenv(\"HOME\") so that child processes can benefit from it (similar to TMPDIR and TERM in current msysgit's mingw_startup()). Not setting $HOME because it may hypothetically break child processes is a very weak argument, as we always did set $HOME in etc/profile (since the initial version back in 2007).\n>\n>  * no fallback to $USERPROFILE doesn't work with diconnected home share\n>\n> If you really have time to spare, I suggest you focus on getting the Unicode patches upstream so that we can progress from there (e.g. move $HOME setup to mingw_startup() so that we can get rid of redundant logic in etc/profile, git-wrapper, git-bash.bat, git-cmd.bat etc.).\n\nPerhaps we can patch up the upstream to better match Git for Windows\nwithout upstreaming the Unicode patches? Don't get me wrong; I think\nupstreaming them is a good idea, but in case time is lacking...\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243386","messageId":"20140605102346.GA28309@camelia.ucw.cz","threadId":"36835","inReplyTo":"53902B2C.7050807@web.de","subject":"[PATCH v3] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-06-05T10:23:46Z","receivedAt":"2014-06-05T10:23:46Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\nDate: Wed, 2 Jun 2010 00:41:33 +0200\n\nIf HOME is not set, use $HOMEDRIVE$HOMEPATH\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Stepan Kasal <kasal@ucw.cz>\n---\n\nOn Thu, Jun 05, 2014 at 10:32:44AM +0200, Torsten Bögershausen wrote:\n> > +\t\tstrbuf_addf(&buf, \"%s%s\", getenv_cs(\"HOMEDRIVE\"), getenv_cs(\"HOMEPATH\"));\n> should we have a NULL pointer check here?\n\nYou are right, of course.\n\n> If HOMEDRIVE is set, but not HOMEPATH, we can fall back into the root of HOMEDRIVE:\n\nIndeed, but it means setting homepath=\"\\\\\";\n\nUpdated according to your comments.  Thanks,\n\tStepan\n\n compat/mingw.c | 11 +++++++++++\n 1 file changed, 11 insertions(+)\n\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex a0e13bc..14af013 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -1181,6 +1181,17 @@ char *mingw_getenv(const char *name)\n \t\tif (!result)\n \t\t\tresult = getenv_cs(\"TEMP\");\n \t}\n+\tif (!result && !strcmp(name, \"HOME\")) {\n+\t\tconst char *homedrive = getenv_cs(\"HOMEDRIVE\");\n+\t\tconst char *homepath = getenv_cs(\"HOMEPATH\");\n+\t\tif (homedrive) {\n+\t\t\tstruct strbuf buf = STRBUF_INIT;\n+\t\t\tif (!homepath)\n+\t\t\t\thomepath = \"\\\\\";\n+\t\t\tstrbuf_addf(&buf, \"%s%s\", homedrive, homepath);\n+\t\t\tresult = strbuf_detach(&buf, NULL);\n+\t\t}\n+\t}\n \treturn result;\n }\n \n-- \n2.0.0.9635.g0be03cb\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243387","messageId":"20140605112322.GB28309@camelia.ucw.cz","threadId":"36835","inReplyTo":"53903B22.70507@gmail.com","subject":"Re: [PATCH v2] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-06-05T11:23:22Z","receivedAt":"2014-06-05T11:23:22Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hello,\n\nOn Thu, Jun 05, 2014 at 11:40:50AM +0200, Karsten Blees wrote:\n> Am 05.06.2014 10:03, schrieb Stepan Kasal:\n> > I hope you can ack this patch as a step forward.\n> \n> No, not really. It's sure better than introducing a special\n> get_home_directory(), but it still increases the diff between\n> upstream and msysgit rather than reducing it. [...]\n\nthis patch (v3) is a win-win for both sides:\n\n- upstream would get at least $HOMEDRIVE$HOMEPATH\n- downstream would get rid of get_home_directory\n- it would decrease the diff, in my metric[*]\n\n[*]  The patch with get_home_directory() could be that dropped.\nYes, the patch \"84b7969 Win32: patch Windows environment on startup\"\nwould have to be updated, but I can handle that easily.\n\n> The main critique points still remain:\n>  * $HOME is usually set up correctly before calling git, [...]\n>  * even if $HOME was empty, git should setenv(\"HOME\") [...]\n>  * no fallback to $USERPROFILE [...]\n\nThis is a plan for further work, but not an argument against the\ncurrent version of patch.\n\n> If you really have time to spare, I suggest you focus on getting\n> the Unicode patches upstream so that we can progress from there\n\nNot that much time.  That's why I try to push the patches that seem\nto be simpler.  Some get discussed, some get ignored, but some get\naccepted (or dropped).\n\nStepan\n\nPS:\ntongue in cheek:\nIf _you_ could find some time, could you please support these:\nhttp://thread.gmane.org/gmane.comp.version-control.msysgit/20324\n\nThe first patch of the pair introduces mingw_startup, which is a good\nbase for other changes.\nThe second one is my new fix for const warnings, exactly according\nto the lines mentioned here: instead of fixing all the consumers and\nwaiting when it'll break again, I modified the mingw-specific code\nto adapt better.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243388","messageId":"alpine.DEB.1.00.1406051354000.14982@s15462909.onlinehome-server.info","threadId":"36835","inReplyTo":"538FCAF5.7030102@gmail.com","subject":"Re: Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-06-05T12:03:39Z","receivedAt":"2014-06-05T12:03:39Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Karsten,\n\nOn Thu, 5 Jun 2014, Karsten Blees wrote:\n\n> After a bit of digging in the history and the old googlegroups issue\n> tracker, I think this patch is completely unrelated to the non-ASCII\n> problems.\n\nActually, the non-ASCII problems were the trigger for my patch.\n\n> In summary, this patch fixes 'git config' for the portable version only,\n> and it only does so partially.\n\nCare to elaborate?\n\n> Am 04.06.2014 17:46, schrieb Johannes Schindelin:\n> \n> > I would be strongly in favor of fixing the problem by the root:\n> > avoiding to have Git rely on the HOME environment variable to be set,\n> > but instead add a clean API call that even says what it is supposed to\n> > do: gimme the user's home directory's path. And that is exactly what\n> > the patch does.\n> \n> By that argument we'd have to introduce API abstractions for every\n> environment variable that could possibly resemble a path (PATH, TMPDIR,\n> GIT_DIR, GIT_WORK_DIR, GIT_TRACE* etc.).\n\nBut of course you are mixing things here. GIT_* are purely Git-specific\nconstructs, so there is no possibility for confusion. PATH and TMPDIR need\nto be handled specially (as does HOME) because we are reusing environment\nvariable concepts that pose their own set of problems on Windows because\nof the separator, the path separator and the encoding problems.\n\nI understand that it is easy to confuse my want for a API function for the\nhome variable with handling for other environment variables. But that HOME\nis an environment variable is not the point at all! It just *happens* to\nbe an environment variable on Linux/Unix.\n\n> We already have similar fallback logic for TMPDIR that is completely\n> non-intrusive to core git code (fully encapsulated in mingw.c, see\n> mingw_getenv (upstream) or mingw_startup (msysgit)). IMO such a solution\n> would be hugely preferable over adding an additional\n> get_home_directory() API (and continuously checking that no new upstream\n> code accidentally introduces another 'getenv(\"HOME\")').\n\nWell, since you mention that TMPDIR hack: this is a hack. We are bending\nover in order for upstream not having to accomodate non-POSIX operating\nsystems. But how much cleaner would it be if there was an API call with\nvarargs. After all, by the reasoning \"TMPDIR is a standard on Unix\" you\nwould also have to special case \"/tmp/\" in all the open/opendir/etc\nfunctions because the temporary directory is /tmp/ on Linux/Unix, right?\n\nRender me even more convinced that the API call is the cleanest way to go,\nDscho\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243389","messageId":"20140605121521.GA28894@camelia.ucw.cz","threadId":"36835","inReplyTo":"alpine.DEB.1.00.1406051354000.14982@s15462909.onlinehome-server.info","subject":"Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-06-05T12:15:21Z","receivedAt":"2014-06-05T12:15:21Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hi,\n\nOn Thu, Jun 05, 2014 at 02:03:39PM +0200, Johannes Schindelin wrote:\n> Render me even more convinced that the API call is the cleanest way to go,\n\nBut not me.  \n\nIn a paralel post, Duy Nguyen wrote:\n> Thank you for working on pushing msysgit patches upstream. I don't use\n> git on windows, but it's nice to see all windows-specific changes in\n> one code base so we can try to workaround it when new patches/features\n> are developed.\n\n... but we should not obscure that more than necessary.  If the API\ncall is   getenv(\"HOME\");  it helps.  And the hack with\nmingw_getenv() is not that bad, so we should be pragmatic and accept\nit.\n\nStepan\n"},{"id":"243392","messageId":"alpine.DEB.1.00.1406051411580.14982@s15462909.onlinehome-server.info","threadId":"36835","inReplyTo":"53903B22.70507@gmail.com","subject":"Re: [PATCH v2] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2014-06-05T13:39:26Z","receivedAt":"2014-06-05T13:39:26Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Karsten,\n\nOn Thu, 5 Jun 2014, Karsten Blees wrote:\n\n> Am 05.06.2014 10:03, schrieb Stepan Kasal:\n> \n>  * even if $HOME was empty, git should setenv(\"HOME\") so that child\n>  processes can benefit from it (similar to TMPDIR and TERM in current\n>  msysgit's mingw_startup()). Not setting $HOME because it may\n>  hypothetically break child processes is a very weak argument, as we\n>  always did set $HOME in etc/profile (since the initial version back in\n>  2007).\n\nI do remember that I tried that first, as I mentioned in this thread.\nThere must have been a breakage preventing me from going that route.\n\nAnd in particular with your changes to Unicodify the complete environment,\nI am *highly* doubtful that child processes will be able to handle\nthemselves properly, unless we spend a whole lot of time converting back\nand forth the environment when calling children.\n\nCiao,\nDscho\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243396","messageId":"53907FD6.4060609@gmail.com","threadId":"36835","inReplyTo":"alpine.DEB.1.00.1406051354000.14982@s15462909.onlinehome-server.info","subject":"Re: Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-06-05T14:33:58Z","receivedAt":"2014-06-05T14:33:58Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"Am 05.06.2014 14:03, schrieb Johannes Schindelin:\n> Hi Karsten,\n> \n> On Thu, 5 Jun 2014, Karsten Blees wrote:\n> \n>> After a bit of digging in the history and the old googlegroups issue\n>> tracker, I think this patch is completely unrelated to the non-ASCII\n>> problems.\n> \n> Actually, the non-ASCII problems were the trigger for my patch.\n\nThe commit message explicitly claims that it fixes issue 482, which is: 'git config --global' in the portable version fails with \"fatal: $HOME not set\" (not \"unable to access '...'\", which you would get for a mangled path that doesn't exist).\n\nAs outlined in the previous mail (analysis 1.), the non-ASCII problem is caused by a bug in msys.dll, and it is in fact impossible to fix in git (even if that was your intention).\n\n> \n>> In summary, this patch fixes 'git config' for the portable version only,\n>> and it only does so partially.\n> \n> Care to elaborate?\n> \n\nSee previous mail analysis 3. In short: it doesn't work with disconnected home share (issue 259), and it doesn't setenv(\"HOME\") (so child processes such as git-gui will most likely fail).\n\n>> Am 04.06.2014 17:46, schrieb Johannes Schindelin:\n>>\n>>> I would be strongly in favor of fixing the problem by the root:\n>>> avoiding to have Git rely on the HOME environment variable to be set,\n>>> but instead add a clean API call that even says what it is supposed to\n>>> do: gimme the user's home directory's path. And that is exactly what\n>>> the patch does.\n>>\n>> By that argument we'd have to introduce API abstractions for every\n>> environment variable that could possibly resemble a path (PATH, TMPDIR,\n>> GIT_DIR, GIT_WORK_DIR, GIT_TRACE* etc.).\n> \n> But of course you are mixing things here. GIT_* are purely Git-specific\n> constructs, so there is no possibility for confusion. PATH and TMPDIR need\n> to be handled specially (as does HOME) because we are reusing environment\n> variable concepts that pose their own set of problems on Windows because\n> of the separator, the path separator and the encoding problems.\n> \n> I understand that it is easy to confuse my want for a API function for the\n> home variable with handling for other environment variables. But that HOME\n> is an environment variable is not the point at all! It just *happens* to\n> be an environment variable on Linux/Unix.\n> \n>> We already have similar fallback logic for TMPDIR that is completely\n>> non-intrusive to core git code (fully encapsulated in mingw.c, see\n>> mingw_getenv (upstream) or mingw_startup (msysgit)). IMO such a solution\n>> would be hugely preferable over adding an additional\n>> get_home_directory() API (and continuously checking that no new upstream\n>> code accidentally introduces another 'getenv(\"HOME\")').\n> \n> Well, since you mention that TMPDIR hack: this is a hack. We are bending\n> over in order for upstream not having to accomodate non-POSIX operating\n> systems.\n\nExactly. In order to support different platforms, we need to agree on a common abstraction layer to access platform-specific functionality. For the git project, this common abstraction layer happens to be the POSIX standard (actually: the subset of the standard that is used by core git code). And compat/mingw.c implements that abstraction layer for the native Windows platform.\n\nThere are cases where conforming to the standard is simply not feasible, e.g. fork() (we don't want to build another cygwin). So we sometimes need special handling for certain functionality in core-git (see run-command.c in case of fork()).\n\nHowever, getenv(\"HOME\"), getenv(\"TMPDIR\") and getenv(\"PATH\") are all fully POSIX compliant, including the standardised variable names. In this particular case, conforming to the standard (via special handling in mingw_getenv or mingw_startup) is actually even _simpler_ than inventing a new, non-standard, undocumented get_home_directory() API.\n\n> But how much cleaner would it be if there was an API call with\n> varargs. After all, by the reasoning \"TMPDIR is a standard on Unix\" you\n> would also have to special case \"/tmp/\" in all the open/opendir/etc\n> functions because the temporary directory is /tmp/ on Linux/Unix, right?\n\nNo, POSIX doesn't specify path names. The standard way to get the temp directory is 'getenv(\"TMPDIR\")'. A hardcoded \"/tmp\" in core git code would be a bug.\n\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243417","messageId":"5390CD1E.5080500@gmail.com","threadId":"36835","inReplyTo":"alpine.DEB.1.00.1406051411580.14982@s15462909.onlinehome-server.info","subject":"Re: [PATCH v2] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-06-05T20:03:42Z","receivedAt":"2014-06-05T20:03:42Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"Am 05.06.2014 15:39, schrieb Johannes Schindelin:\n> And in particular with your changes to Unicodify the complete environment,\n> I am *highly* doubtful that child processes will be able to handle\n> themselves properly, unless we spend a whole lot of time converting back\n> and forth the environment when calling children.\n\nThe unicode version _does_ convert back and forth, in mingw_startup and make_environment_block, respectively. However, as the unicode environment is sorted, this is actually much faster than the original version.\n\nTo put things in perspective *:\n\nentire mingw_startup: ~450 µs\n * _wgetmainargs: 25 µs\n * allocate+convert args and environment: 25 µs\n * qsort environment: 15 µs\n * winansi_init: 393 µs\n\nentire mingw_spawnve_fd: ~1250 µs\n * make_environment_block: 25 µs\n * CreateProcessW: 690 µs\n\nNow, the unicode mingw_getenv is O(log n) (~0.15 µs per call) and MSVCRT's getenv is O(n) (~3.6 µs per call).\n\nA git command that just launches a script (e.g. git gui) calls getenv ~25 times. (3.6 µs - 0.15 µs) * 25 = 86 µs, i.e. this compensates the additional startup time (including qsort) more than twice.\n\n(*) Measurements done via QueryPerformanceCounter, with 75 environment entries, on a Core i7 960, Windows 7 x64\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243422","messageId":"5390E4B6.60206@gmail.com","threadId":"36835","inReplyTo":"CABPQNSYtxLyWkRGOyst7VOpw-_=rQvKF_VsbDB7Y0-K=d9rvkQ@mail.gmail.com","subject":"Re: [PATCH v2] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Karsten Blees","fromEmail":"karsten.blees@gmail.com","sentAt":"2014-06-05T21:44:22Z","receivedAt":"2014-06-05T21:44:22Z","isPatch":true,"sender":{"key":"karsten.blees@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1111200?v=4"},"body":"Am 05.06.2014 11:58, schrieb Erik Faye-Lund:\n> On Thu, Jun 5, 2014 at 11:40 AM, Karsten Blees <karsten.blees@gmail.com> wrote:\n>> Am 05.06.2014 10:03, schrieb Stepan Kasal:\n>>> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>>> Date: Wed, 2 Jun 2010 00:41:33 +0200\n>>>\n>>> If HOME is not set, use $HOMEDRIVE$HOMEPATH\n>>>\n>>> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n>>> Signed-off-by: Stepan Kasal <kasal@ucw.cz>\n>>> ---\n>>>\n>>> Hello Karsten,\n>>> thanks for your explanation.  There are more things to be done, but\n>>> I hope you can ack this patch as a step forward.\n>>>\n>>\n>> No, not really. Its sure better than introducing a special get_home_directory(), but it still increases the diff between upstream and msysgit rather than reducing it. The main critique points still remain:\n>>\n>>  * $HOME is usually set up correctly before calling git, so this is essentially dead code (just checked, portable git's git-bash.bat and git-cmd.bat also do this correctly)\n> \n> What about when tools like TortoiseGit and Git Extensions call git?\n> We're not guaranteed that they did the $HOME-dance, are we?\n> \n\nGitExtensions does the same thing, see issue 497. I don't know about TortoiseGit, but I suspect the same.\n\n>>  * even if $HOME was empty, git should setenv(\"HOME\") so that child processes can benefit from it (similar to TMPDIR and TERM in current msysgit's mingw_startup()). Not setting $HOME because it may hypothetically break child processes is a very weak argument, as we always did set $HOME in etc/profile (since the initial version back in 2007).\n>>\n>>  * no fallback to $USERPROFILE doesn't work with diconnected home share\n>>\n>> If you really have time to spare, I suggest you focus on getting the Unicode patches upstream so that we can progress from there (e.g. move $HOME setup to mingw_startup() so that we can get rid of redundant logic in etc/profile, git-wrapper, git-bash.bat, git-cmd.bat etc.).\n> \n> Perhaps we can patch up the upstream to better match Git for Windows\n> without upstreaming the Unicode patches? Don't get me wrong; I think\n> upstreaming them is a good idea, but in case time is lacking...\n> \n\nThe unicode patch series happens to be one of the first on top of upstream, and its also the longest (~40 patches) and I believe most intrusive one (~1500 lines changed). So I think the most time-preserving option is to send it upstream as unchanged as possible (probably with the bugfix-patches squashed). There's only ~50 lines changed outside of compat, so hopefully there won't be too many additional review-rounds...\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243448","messageId":"20140606080312.GA1303@camelia.ucw.cz","threadId":"36835","inReplyTo":"5390E4B6.60206@gmail.com","subject":"Re: [PATCH v2] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Stepan Kasal","fromEmail":"kasal@ucw.cz","sentAt":"2014-06-06T08:03:12Z","receivedAt":"2014-06-06T08:03:12Z","isPatch":true,"sender":{"key":"kasal@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/1481596?v=4"},"body":"Hi,\n\nOn Thu, Jun 05, 2014 at 11:44:22PM +0200, Karsten Blees wrote:\n> I think the most time-preserving option is to send it upstream as\n> unchanged as possible (probably with the bugfix-patches squashed).\n\nI plan to submit one by one or in a small series.\nAgreed about the squashes, I have several of them prepared, thanks to\nyour hints.\n\nStepan\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"243451","messageId":"F7214060B5854FCEBCC93E0B45F0CADA@PhilipOakley","threadId":"36835","inReplyTo":"alpine.DEB.1.00.1406041946510.14982@s15462909.onlinehome-server.info","subject":"Git for Windows SDK","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2014-06-06T09:12:34Z","receivedAt":"2014-06-06T09:12:34Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"----- Original Message ----- \nFrom: \"Johannes Schindelin\" <Johannes.Schindelin@gmx.de>\nwas \"Re: [msysGit] Re: [PATCH] Add a Windows-specific fallback to \ngetenv(\"HOME\");\n\n<snip>\n\n> Seriously again, I am in favor of calling it the Git for Windows SDK. \n> But\n> really, it is bikeshedding at this point. There is real work to do, \n> still,\n> before we can switch. Lots of unaddressed questions. Too little time.\n> Speaking of which... budget's depleted for today ;-)\n>\n> Ciao,\n> Dscho\n>\n> -- \n\nI like the \"Git for Windows SDK\" name.\n\nFor me it communicates the intent very well and reflects in my mind the \nwider world naming conventuion for such things. It probably isn't an \n\"IDE\" in the wider sense, though I'm sure it could be, depending on \nviewpoint.\n\nso +1 on the \"G4W SDK\".\n</bikeshedding>\n\nPhilip \n"},{"id":"243513","messageId":"539215CB.10208@gmail.com","threadId":"36835","inReplyTo":"20140604161625.GB23226@camelia.ucw.cz","subject":"Re: [PATCH] Add a Windows-specific fallback to getenv(\"HOME\");","fromName":"Sebastian Schuberth","fromEmail":"sschuberth@gmail.com","sentAt":"2014-06-06T19:26:03Z","receivedAt":"2014-06-06T19:26:03Z","isPatch":true,"sender":{"key":"sschuberth@gmail.com","avatar":"https://avatars.githubusercontent.com/u/349154?v=4"},"body":"On 04.06.2014 18:16, Stepan Kasal wrote:\n\n>> plan is to switch to mingwGitDevEnv for said release. No more msysGit.\n>> Like, bu-bye. Thanks for all the fish.\n> \n> Interesting.\n> \n> With msysgit, there is the \"net installer\" - first time I installed\n> msys/mingw sucessfully, it was as easy as Cygwin, perhaps even\n> easier.\n\nAnd with mingwGitDevEnv, there's the equivalent installer at [1].\n\n> When I go to mingwGitDevEnv home page, I read about chickens, eggs,\n> and upgrading Perl (which msysGit simply gives up, hinting that it is\n> almost impossible).\n\nI have absolutely no idea what chickens and eggs that would be. If you care to elaborate, please consider using the mingwGitDevEnv mailing list [2].\n\n> PPS: from marketing point of view, mingwGitDevEnv is far from usable\n> name.  Dscho, if you support the idea, would you mind franchising\n> msysGit 2.0 for a decent amount?\n\nDoh. Marketing. As if we would sell something. I still believe developers are more interested in getting things done no matter what the tools are called. At east they should be.\n\n[1] http://mingwgitdevenv.cloudapp.net/job/mingwGitDevEnv-build-installer/lastSuccessfulBuild/artifact/download.html\n[2] http://groups.google.com/group/mingwGitDevEnv\n\n-- \nSebastian Schuberth\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"msysGit\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"}]}