{"thread":{"id":"15809","subject":"[QGit bug] git user settings not retrieved when launched for Windows explorer","startedAt":"2008-10-07T07:33:28Z","lastAt":"2008-10-07T18:28:55Z","messageCount":18,"participants":["Abdelrazak Younes","Marco Costalba"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"92501","messageId":"48EB10C8.4070009@lyx.org","threadId":"15809","inReplyTo":null,"subject":"[QGit bug] git user settings not retrieved when launched for Windows explorer","fromName":"Abdelrazak Younes","fromEmail":"younes@lyx.org","sentAt":"2008-10-07T07:33:28Z","receivedAt":"2008-10-07T07:33:28Z","isPatch":false,"sender":{"key":"younes@lyx.org","avatar":null},"body":"Dear Marco,\n\nWhen I double click on qgit.exe, the user name and email are not shown \nin the user settings (for any of the 3 combo values). But if I run qgit \nfrom the commandline at the mysysgit bash prompt, the boxes are properly \nfilled. I would like to debug it but, as I reported last week, the MSVC \nproject doesn't work for me.\n\nBy the way, these two edit boxes are not editable on Windows, is that on \npurpose? If yes, maybe we could let the user change them is 'Local \nconfig' is selected and call the appropriate git function?\n\nThanks,\nAbdel.\n"},{"id":"92511","messageId":"e5bfff550810070410t1097ace4pf401821292fd7565@mail.gmail.com","threadId":"15809","inReplyTo":"48EB10C8.4070009@lyx.org","subject":"Re: [QGit bug] git user settings not retrieved when launched for Windows explorer","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2008-10-07T11:10:52Z","receivedAt":"2008-10-07T11:10:52Z","isPatch":false,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On Tue, Oct 7, 2008 at 9:33 AM, Abdelrazak Younes <younes@lyx.org> wrote:\n> Dear Marco,\n>\n> When I double click on qgit.exe, the user name and email are not shown in\n> the user settings (for any of the 3 combo values). But if I run qgit from\n> the commandline at the mysysgit bash prompt, the boxes are properly filled.\n> I would like to debug it but, as I reported last week, the MSVC project\n> doesn't work for me.\n>\n\nSound like a problem of startup directory: on the command line you\nstart from the right directory...when you double click on which repo\nqgit is open ?\n\nMarco\n"},{"id":"92513","messageId":"e5bfff550810070416y4db5a37t7302c2a0562f1527@mail.gmail.com","threadId":"15809","inReplyTo":"48EB10C8.4070009@lyx.org","subject":"Re: [QGit bug] git user settings not retrieved when launched for Windows explorer","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2008-10-07T11:16:24Z","receivedAt":"2008-10-07T11:16:24Z","isPatch":false,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On Tue, Oct 7, 2008 at 9:33 AM, Abdelrazak Younes <younes@lyx.org> wrote:\n> Dear Marco,\n>\n>\n> By the way, these two edit boxes are not editable on Windows, is that on\n> purpose? If yes, maybe we could let the user change them is 'Local config'\n> is selected and call the appropriate git function?\n>\n\nI know this limitation. I was just too lazy to implement edit\nmyself...it would be a nice patch to have tough ;-)\n\nThanks\nMarco\n"},{"id":"92514","messageId":"48EB49B3.1090509@lyx.org","threadId":"15809","inReplyTo":"e5bfff550810070410t1097ace4pf401821292fd7565@mail.gmail.com","subject":"Re: [QGit bug] git user settings not retrieved when launched for Windows explorer","fromName":"Abdelrazak Younes","fromEmail":"younes@lyx.org","sentAt":"2008-10-07T11:36:20Z","receivedAt":"2008-10-07T11:36:20Z","isPatch":false,"sender":{"key":"younes@lyx.org","avatar":null},"body":"On 07/10/2008 13:10, Marco Costalba wrote:\n> On Tue, Oct 7, 2008 at 9:33 AM, Abdelrazak Younes<younes@lyx.org>  wrote:\n>    \n>> Dear Marco,\n>>\n>> When I double click on qgit.exe, the user name and email are not shown in\n>> the user settings (for any of the 3 combo values). But if I run qgit from\n>> the commandline at the mysysgit bash prompt, the boxes are properly filled.\n>> I would like to debug it but, as I reported last week, the MSVC project\n>> doesn't work for me.\n>>\n>>      \n>\n> Sound like a problem of startup directory: on the command line you\n> start from the right directory...when you double click on which repo\n> qgit is open ?\n>    \n\nNone of course. But when I open a repository manually I would expect \nthat this is properly filled in.\n\nAnd if I launch qgit with the context menu (right clicking a directory \nin the Explorer), qgit never managed to open the repository.\n\nAbdel.\n"},{"id":"92516","messageId":"48EB4B36.2090301@lyx.org","threadId":"15809","inReplyTo":"e5bfff550810070416y4db5a37t7302c2a0562f1527@mail.gmail.com","subject":"Re: [QGit bug] git user settings not retrieved when launched for Windows explorer","fromName":"Abdelrazak Younes","fromEmail":"younes@lyx.org","sentAt":"2008-10-07T11:42:46Z","receivedAt":"2008-10-07T11:42:46Z","isPatch":false,"sender":{"key":"younes@lyx.org","avatar":null},"body":"On 07/10/2008 13:16, Marco Costalba wrote:\n> On Tue, Oct 7, 2008 at 9:33 AM, Abdelrazak Younes<younes@lyx.org>  wrote:\n>    \n>> Dear Marco,\n>>\n>>\n>> By the way, these two edit boxes are not editable on Windows, is that on\n>> purpose? If yes, maybe we could let the user change them is 'Local config'\n>> is selected and call the appropriate git function?\n>>\n>>      \n>\n> I know this limitation. I was just too lazy to implement edit\n> myself...it would be a nice patch to have tough ;-)\n>    \n\nI am not sure I'll find the time to learn enough about git internals to \ndo that kind of stuff. Maybe later.\n\nAbdel.\n"},{"id":"92518","messageId":"e5bfff550810070457i702c2935lfcc0b60ae3df4dc4@mail.gmail.com","threadId":"15809","inReplyTo":"48EB49B3.1090509@lyx.org","subject":"Re: [QGit bug] git user settings not retrieved when launched for Windows explorer","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2008-10-07T11:57:42Z","receivedAt":"2008-10-07T11:57:42Z","isPatch":false,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On Tue, Oct 7, 2008 at 1:36 PM, Abdelrazak Younes <younes@lyx.org> wrote:\n>\n>> Sound like a problem of startup directory: on the command line you\n>> start from the right directory...when you double click on which repo\n>> qgit is open ?\n>>\n>\n> None of course. But when I open a repository manually I would expect that\n> this is properly filled in.\n>\n\nIn git.cpp, Git::userInfo() function get info about user by means of\n'git config' calls, my guess (I cannot it test now) is that 'git\nconfig' does not work if we are not in a git directory.\n\n\n> And if I launch qgit with the context menu (right clicking a directory in\n> the Explorer), qgit never managed to open the repository.\n>\n\nThis is a bug that I never managed to get rid of :-(\n\nIt is strange because it works if you try in a subdirectory, as\nexample try right clicking on 'src' directory of qgit project.\n\nThanks\nMarco\n"},{"id":"92520","messageId":"48EB5129.2010407@lyx.org","threadId":"15809","inReplyTo":"e5bfff550810070457i702c2935lfcc0b60ae3df4dc4@mail.gmail.com","subject":"Re: [QGit bug] git user settings not retrieved when launched for Windows explorer","fromName":"Abdelrazak Younes","fromEmail":"younes@lyx.org","sentAt":"2008-10-07T12:08:09Z","receivedAt":"2008-10-07T12:08:09Z","isPatch":false,"sender":{"key":"younes@lyx.org","avatar":null},"body":"On 07/10/2008 13:57, Marco Costalba wrote:\n> On Tue, Oct 7, 2008 at 1:36 PM, Abdelrazak Younes<younes@lyx.org>  wrote:\n>    \n>>> Sound like a problem of startup directory: on the command line you\n>>> start from the right directory...when you double click on which repo\n>>> qgit is open ?\n>>>\n>>>        \n>> None of course. But when I open a repository manually I would expect that\n>> this is properly filled in.\n>>\n>>      \n>\n> In git.cpp, Git::userInfo() function get info about user by means of\n> 'git config' calls, my guess (I cannot it test now) is that 'git\n> config' does not work if we are not in a git directory.\n>    \n\nOK, I'll have a look, thanks.\n\n>\n>    \n>> And if I launch qgit with the context menu (right clicking a directory in\n>> the Explorer), qgit never managed to open the repository.\n>>\n>>      \n>\n> This is a bug that I never managed to get rid of :-(\n>\n> It is strange because it works if you try in a subdirectory, as\n> example try right clicking on 'src' directory of qgit project.\n>    \n\nI tried and it doesn't work this way either; the statusbar tells me that \nthis is 'Not a git archive' :-(\n\nAbdel.\n"},{"id":"92522","messageId":"48EB56BA.5020502@lyx.org","threadId":"15809","inReplyTo":"e5bfff550810070457i702c2935lfcc0b60ae3df4dc4@mail.gmail.com","subject":"Re: [QGit bug] git user settings not retrieved when launched for Windows explorer","fromName":"Abdelrazak Younes","fromEmail":"younes@lyx.org","sentAt":"2008-10-07T12:31:54Z","receivedAt":"2008-10-07T12:31:54Z","isPatch":false,"sender":{"key":"younes@lyx.org","avatar":null},"body":"On 07/10/2008 13:57, Marco Costalba wrote:\n> On Tue, Oct 7, 2008 at 1:36 PM, Abdelrazak Younes<younes@lyx.org>  wrote:\n>    \n>>> Sound like a problem of startup directory: on the command line you\n>>> start from the right directory...when you double click on which repo\n>>> qgit is open ?\n>>>\n>>>        \n>> None of course. But when I open a repository manually I would expect that\n>> this is properly filled in.\n>>\n>>      \n>\n> In git.cpp, Git::userInfo() function get info about user by means of\n> 'git config' calls, my guess (I cannot it test now) is that 'git\n> config' does not work if we are not in a git directory.\n>    \nNo, 'git config user.name' works fine in any directory, even on the \nnaked Windows console (I mean without msys bash). So that must be \nsomething else. I've traced it down to\nMyProcess::on_finished().\n\n     isErrorExit =   (exitStatus != QProcess::NormalExit)\n                  || (exitCode != 0 && isWinShell)\n                  || !errorDesc.isEmpty()\n                  ||  canceling;\n\nAt this point we have:\nexitStatus = NormalExit\nexitCode = 1\nisWinShell = false\nerrorDesc.isEmpty() returns true\ncanceling = false\n\nWhich gives 'isErrorExit = false'. I wonder if the isWinShell test is \ncorrect?\n\nAbdel.\n"},{"id":"92524","messageId":"48EB5FAF.4080303@lyx.org","threadId":"15809","inReplyTo":"e5bfff550810070457i702c2935lfcc0b60ae3df4dc4@mail.gmail.com","subject":"[QGIT PATCH] Add safeguards to Git::userInfo()","fromName":"Abdelrazak Younes","fromEmail":"younes@lyx.org","sentAt":"2008-10-07T13:10:07Z","receivedAt":"2008-10-07T13:10:07Z","isPatch":true,"sender":{"key":"younes@lyx.org","avatar":null},"body":"On 07/10/2008 13:57, Marco Costalba wrote:\n> On Tue, Oct 7, 2008 at 1:36 PM, Abdelrazak Younes<younes@lyx.org>  wrote:\n>    \n>>> Sound like a problem of startup directory: on the command line you\n>>> start from the right directory...when you double click on which repo\n>>> qgit is open ?\n>>>\n>>>        \n>> None of course. But when I open a repository manually I would expect that\n>> this is properly filled in.\n>>\n>>      \n>\n> In git.cpp, Git::userInfo() function get info about user by means of\n> 'git config' calls, my guess (I cannot it test now) is that 'git\n> config' does not work if we are not in a git directory.\n>    \n\nOK, with this patch, I see that the local config request is apparently \nsuccessful even though the 'user' and 'email' strings stay empty.\nOTOH, the two global config requests fail.\n\n---\n  src/git.cpp |   19 ++++++++++++-------\n  1 files changed, 12 insertions(+), 7 deletions(-)\n\ndiff --git a/src/git.cpp b/src/git.cpp\nindex 4ffc4ea..e77f4a1 100755\n--- a/src/git.cpp\n+++ b/src/git.cpp\n@@ -6,6 +6,8 @@\n      Copyright: See COPYING file that comes with this distribution\n\n  */\n+#include <string>\n+\n  #include <QApplication>\n  #include <QDateTime>\n  #include <QDir>\n@@ -347,13 +349,16 @@ void Git::userInfo(SList info) {\n\n      errorReportingEnabled = false; // 'git config' could fail, see docs\n\n-    run(\"git config user.name\", &user);\n-    run(\"git config user.email\", &email);\n-    info << \"Local config\" << user << email;\n-\n-    run(\"git config --global user.name\", &user);\n-    run(\"git config --global user.email\", &email);\n-    info << \"Global config\" << user << email;\n+    if (bool success = run(\"git config user.name\", &user)) {\n+        success = run(\"git config user.email\", &email);\n+        if (success)\n+            info << \"Local config\" << user << email;\n+    }\n+    if (bool success = run(\"git config --global user.name\", &user)) {\n+        success = run(\"git config --global user.email\", &email);\n+        if (success)\n+            info << \"Global config\" << user << email;\n+    }\n\n      errorReportingEnabled = true;\n  }\n-- \n1.6.0.2.1172.ga5ed0\n"},{"id":"92545","messageId":"e5bfff550810070948p6a9b2fdcq51f2b1580cef2f4e@mail.gmail.com","threadId":"15809","inReplyTo":"48EB56BA.5020502@lyx.org","subject":"Re: [QGit bug] git user settings not retrieved when launched for Windows explorer","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2008-10-07T16:48:21Z","receivedAt":"2008-10-07T16:48:21Z","isPatch":false,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On Tue, Oct 7, 2008 at 2:31 PM, Abdelrazak Younes <younes@lyx.org> wrote:\n>\n> No, 'git config user.name' works fine in any directory, even on the naked\n> Windows console (I mean without msys bash). So that must be something else.\n> I've traced it down to\n> MyProcess::on_finished().\n>\n>    isErrorExit =   (exitStatus != QProcess::NormalExit)\n>                 || (exitCode != 0 && isWinShell)\n>                 || !errorDesc.isEmpty()\n>                 ||  canceling;\n>\n> At this point we have:\n> exitStatus = NormalExit\n> exitCode = 1\n> isWinShell = false\n> errorDesc.isEmpty() returns true\n> canceling = false\n>\n> Which gives 'isErrorExit = false'. I wonder if the isWinShell test is\n> correct?\n>\n\nHi Abdel,\n\nI would think it is correct to return isErrorExit == false\n\nThe problem is that it seems git config return empty data if run from\noutside git directory...isn't it ?\n\n\nMarco\n"},{"id":"92547","messageId":"e5bfff550810070950j66bbb980vc26bd50a5615d44@mail.gmail.com","threadId":"15809","inReplyTo":"48EB5FAF.4080303@lyx.org","subject":"Re: [QGIT PATCH] Add safeguards to Git::userInfo()","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2008-10-07T16:50:46Z","receivedAt":"2008-10-07T16:50:46Z","isPatch":true,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On Tue, Oct 7, 2008 at 3:10 PM, Abdelrazak Younes <younes@lyx.org> wrote:\n>\n> OK, with this patch, I see that the local config request is apparently\n> successful even though the 'user' and 'email' strings stay empty.\n\nAn empty user and email it does not mean failure. Again, I would think\nthat is git config that returns no data (without failing) if it is run\nfrom outside git directory.\n"},{"id":"92548","messageId":"e5bfff550810070955o5ea20e90jf52faf31a0ada013@mail.gmail.com","threadId":"15809","inReplyTo":"e5bfff550810070950j66bbb980vc26bd50a5615d44@mail.gmail.com","subject":"Re: [QGIT PATCH] Add safeguards to Git::userInfo()","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2008-10-07T16:55:26Z","receivedAt":"2008-10-07T16:55:26Z","isPatch":true,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On Tue, Oct 7, 2008 at 6:50 PM, Marco Costalba <mcostalba@gmail.com> wrote:\n>\n> An empty user and email it does not mean failure. Again, I would think\n> that is git config that returns no data (without failing) if it is run\n> from outside git directory.\n>\n\nYes ! it is like this, I have finally had the possibility to test.\n\ngit config does not returns user and mail if run outside git dir\nbecause user and mail are local set.\n"},{"id":"92549","messageId":"48EB977E.1030401@lyx.org","threadId":"15809","inReplyTo":"e5bfff550810070948p6a9b2fdcq51f2b1580cef2f4e@mail.gmail.com","subject":"Re: [QGit bug] git user settings not retrieved when launched for Windows explorer","fromName":"Abdelrazak Younes","fromEmail":"younes@lyx.org","sentAt":"2008-10-07T17:08:14Z","receivedAt":"2008-10-07T17:08:14Z","isPatch":false,"sender":{"key":"younes@lyx.org","avatar":null},"body":"On 07/10/2008 18:48, Marco Costalba wrote:\n> On Tue, Oct 7, 2008 at 2:31 PM, Abdelrazak Younes<younes@lyx.org>  wrote:\n>    \n>> No, 'git config user.name' works fine in any directory, even on the naked\n>> Windows console (I mean without msys bash). So that must be something else.\n>> I've traced it down to\n>> MyProcess::on_finished().\n>>\n>>     isErrorExit =   (exitStatus != QProcess::NormalExit)\n>>                  || (exitCode != 0&&  isWinShell)\n>>                  || !errorDesc.isEmpty()\n>>                  ||  canceling;\n>>\n>> At this point we have:\n>> exitStatus = NormalExit\n>> exitCode = 1\n>> isWinShell = false\n>> errorDesc.isEmpty() returns true\n>> canceling = false\n>>\n>> Which gives 'isErrorExit = false'. I wonder if the isWinShell test is\n>> correct?\n>>\n>>      \n>\n> Hi Abdel,\n>\n> I would think it is correct to return isErrorExit == false\n>    \n\nOK.\n\n> The problem is that it seems git config return empty data if run from\n> outside git directory...isn't it ?\n>    \n\nNo, as I said, 'git config user.name' is working just fine outside git \ndirectory.\n\nAbdel.\n"},{"id":"92550","messageId":"48EB9894.4090905@lyx.org","threadId":"15809","inReplyTo":"e5bfff550810070950j66bbb980vc26bd50a5615d44@mail.gmail.com","subject":"Re: [QGIT PATCH] Add safeguards to Git::userInfo()","fromName":"Abdelrazak Younes","fromEmail":"younes@lyx.org","sentAt":"2008-10-07T17:12:52Z","receivedAt":"2008-10-07T17:12:52Z","isPatch":true,"sender":{"key":"younes@lyx.org","avatar":null},"body":"On 07/10/2008 18:50, Marco Costalba wrote:\n> On Tue, Oct 7, 2008 at 3:10 PM, Abdelrazak Younes<younes@lyx.org>  wrote:\n>    \n>> OK, with this patch, I see that the local config request is apparently\n>> successful even though the 'user' and 'email' strings stay empty.\n>>      \n>\n> An empty user and email it does not mean failure.\n\nYes, I know that but what is troublesome is that the user and email are \nnot empty when git config is called outside of qgit.\nWhat is even more troublesome is that the two calls to 'git config \n--global user.xxx' fail (but don't fail when called manually at the \ncommand line).\n\nAbdel.\n"},{"id":"92555","messageId":"48EB9EB1.7080302@lyx.org","threadId":"15809","inReplyTo":"e5bfff550810070955o5ea20e90jf52faf31a0ada013@mail.gmail.com","subject":"Re: [QGIT PATCH] Add safeguards to Git::userInfo()","fromName":"Abdelrazak Younes","fromEmail":"younes@lyx.org","sentAt":"2008-10-07T17:38:57Z","receivedAt":"2008-10-07T17:38:57Z","isPatch":true,"sender":{"key":"younes@lyx.org","avatar":null},"body":"On 07/10/2008 18:55, Marco Costalba wrote:\n> On Tue, Oct 7, 2008 at 6:50 PM, Marco Costalba<mcostalba@gmail.com>  wrote:\n>> An empty user and email it does not mean failure. Again, I would think\n>> that is git config that returns no data (without failing) if it is run\n>> from outside git directory.\n>>\n>\n> Yes ! it is like this, I have finally had the possibility to test.\n>\n> git config does not returns user and mail if run outside git dir\n> because user and mail are local set.\n\nSo how do you explain this:\n\nC:\\>git config --global user.name\nAbdelrazak Younes\n\nC:\\>git config user.name\nAbdelrazak Younes\n\nI get the same result in any directory, git repo or not.\nFYI, I never set the name locally, just once and globally.\n\nAbdel.\n"},{"id":"92557","messageId":"e5bfff550810071103j52ce2617iae2f77b9bd3fba93@mail.gmail.com","threadId":"15809","inReplyTo":"48EB9EB1.7080302@lyx.org","subject":"Re: [QGIT PATCH] Add safeguards to Git::userInfo()","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2008-10-07T18:03:29Z","receivedAt":"2008-10-07T18:03:29Z","isPatch":true,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On Tue, Oct 7, 2008 at 6:38 PM, Abdelrazak Younes <younes@lyx.org> wrote:\n>\n> So how do you explain this:\n>\n\nForm git-config(1) docs:\n\nThis command will fail if:\n\n-The config file is invalid,\n......\n-you use --global option without $HOME being properly set.\n\n\nSo please try to comment out following line\n\n--- a/src/git.cpp\n+++ b/src/git.cpp\n@@ -345,7 +345,7 @@ void Git::userInfo(SList info) {\n \tinfo.clear();\n \tinfo << \"Environment\" << user << email;\n\n-\terrorReportingEnabled = false; // 'git config' could fail, see docs\n+\t//errorReportingEnabled = false; // 'git config' could fail, see docs\n\n \trun(\"git config user.name\", &user);\n \trun(\"git config user.email\", &email);\n\n\nrun from double click and you probably will see an error message box\nwhere git says $HOME is not set (I can reproduce this now).\n\nSo what I think is that when you run from command line there is the\n$HOME variable set and command does not fails.\n\n\nMarco\n"},{"id":"92559","messageId":"48EBA854.1020205@lyx.org","threadId":"15809","inReplyTo":"e5bfff550810071103j52ce2617iae2f77b9bd3fba93@mail.gmail.com","subject":"Re: [QGIT PATCH] Add safeguards to Git::userInfo()","fromName":"Abdelrazak Younes","fromEmail":"younes@lyx.org","sentAt":"2008-10-07T18:20:04Z","receivedAt":"2008-10-07T18:20:04Z","isPatch":true,"sender":{"key":"younes@lyx.org","avatar":null},"body":"On 07/10/2008 20:03, Marco Costalba wrote:\n> On Tue, Oct 7, 2008 at 6:38 PM, Abdelrazak Younes<younes@lyx.org>  wrote:\n>    \n>> So how do you explain this:\n>>\n>>      \n>\n> Form git-config(1) docs:\n>\n> This command will fail if:\n>\n> -The config file is invalid,\n> ......\n> -you use --global option without $HOME being properly set.\n>\n>\n> So please try to comment out following line\n>\n> --- a/src/git.cpp\n> +++ b/src/git.cpp\n> @@ -345,7 +345,7 @@ void Git::userInfo(SList info) {\n>   \tinfo.clear();\n>   \tinfo<<  \"Environment\"<<  user<<  email;\n>\n> -\terrorReportingEnabled = false; // 'git config' could fail, see docs\n> +\t//errorReportingEnabled = false; // 'git config' could fail, see docs\n>\n>   \trun(\"git config user.name\",&user);\n>   \trun(\"git config user.email\",&email);\n>\n>\n> run from double click and you probably will see an error message box\n> where git says $HOME is not set (I can reproduce this now).\n>    \n\nRight!\n\n> So what I think is that when you run from command line there is the\n> $HOME variable set and command does not fails.\n>    \n\nI see... but the only variable I have is HOMEPATH:\n\nHOMEPATH=\\Users\\abdel\n\nSo I guess this was set by msysgit at installation time. But I see this \nvariable only at the console (after typing 'set'), I don't see it in the \nuser environment variable nor in the system one. So I guess the fix \nwould be for msysgit to create this entry?\n\nThanks,\nAbdel.\n"},{"id":"92561","messageId":"e5bfff550810071128r41634ac3r947c194f3749f9ca@mail.gmail.com","threadId":"15809","inReplyTo":"48EBA854.1020205@lyx.org","subject":"Re: [QGIT PATCH] Add safeguards to Git::userInfo()","fromName":"Marco Costalba","fromEmail":"mcostalba@gmail.com","sentAt":"2008-10-07T18:28:55Z","receivedAt":"2008-10-07T18:28:55Z","isPatch":true,"sender":{"key":"mcostalba@gmail.com","avatar":null},"body":"On Tue, Oct 7, 2008 at 7:20 PM, Abdelrazak Younes <younes@lyx.org> wrote:\n>\n> So I guess this was set by msysgit at installation time. But I see this\n> variable only at the console (after typing 'set'), I don't see it in the\n> user environment variable nor in the system one. So I guess the fix would be\n> for msysgit to create this entry?\n>\n\nBrowsing git-config docs I would think that this variable is needed so\nthat git-config knows where to look for the git global configs file\nthat is under user $HOME directory, see the [FILES] section in git\nconfig docs.\n\nThanks\nMarco\n"}]}