Dear Marco,
When I double click on qgit.exe, the user name and email are not shown
in the user settings (for any of the 3 combo values). But if I run qgit
from the commandline at the mysysgit bash prompt, the boxes are properly
filled. I would like to debug it but, as I reported last week, the MSVC
project doesn't work for me.
By the way, these two edit boxes are not editable on Windows, is that on
purpose? If yes, maybe we could let the user change them is 'Local
config' is selected and call the appropriate git function?
Thanks,
Abdel.
From: Marco Costalba <hidden> Date: 2016-06-15 22:45:27
On Tue, Oct 7, 2008 at 9:33 AM, Abdelrazak Younes [off-list ref] wrote:
Dear Marco,
When I double click on qgit.exe, the user name and email are not shown in
the user settings (for any of the 3 combo values). But if I run qgit from
the commandline at the mysysgit bash prompt, the boxes are properly filled.
I would like to debug it but, as I reported last week, the MSVC project
doesn't work for me.
Sound like a problem of startup directory: on the command line you
start from the right directory...when you double click on which repo
qgit is open ?
Marco
From: Marco Costalba <hidden> Date: 2016-06-15 22:45:27
On Tue, Oct 7, 2008 at 9:33 AM, Abdelrazak Younes [off-list ref] wrote:
Dear Marco,
By the way, these two edit boxes are not editable on Windows, is that on
purpose? If yes, maybe we could let the user change them is 'Local config'
is selected and call the appropriate git function?
I know this limitation. I was just too lazy to implement edit
myself...it would be a nice patch to have tough ;-)
Thanks
Marco
On Tue, Oct 7, 2008 at 9:33 AM, Abdelrazak Younes[off-list ref] wrote:
quoted
Dear Marco,
When I double click on qgit.exe, the user name and email are not shown in
the user settings (for any of the 3 combo values). But if I run qgit from
the commandline at the mysysgit bash prompt, the boxes are properly filled.
I would like to debug it but, as I reported last week, the MSVC project
doesn't work for me.
Sound like a problem of startup directory: on the command line you
start from the right directory...when you double click on which repo
qgit is open ?
None of course. But when I open a repository manually I would expect
that this is properly filled in.
And if I launch qgit with the context menu (right clicking a directory
in the Explorer), qgit never managed to open the repository.
Abdel.
On Tue, Oct 7, 2008 at 9:33 AM, Abdelrazak Younes[off-list ref] wrote:
quoted
Dear Marco,
By the way, these two edit boxes are not editable on Windows, is that on
purpose? If yes, maybe we could let the user change them is 'Local config'
is selected and call the appropriate git function?
I know this limitation. I was just too lazy to implement edit
myself...it would be a nice patch to have tough ;-)
I am not sure I'll find the time to learn enough about git internals to
do that kind of stuff. Maybe later.
Abdel.
From: Marco Costalba <hidden> Date: 2016-06-15 22:45:27
On Tue, Oct 7, 2008 at 1:36 PM, Abdelrazak Younes [off-list ref] wrote:
quoted
Sound like a problem of startup directory: on the command line you
start from the right directory...when you double click on which repo
qgit is open ?
None of course. But when I open a repository manually I would expect that
this is properly filled in.
In git.cpp, Git::userInfo() function get info about user by means of
'git config' calls, my guess (I cannot it test now) is that 'git
config' does not work if we are not in a git directory.
And if I launch qgit with the context menu (right clicking a directory in
the Explorer), qgit never managed to open the repository.
This is a bug that I never managed to get rid of :-(
It is strange because it works if you try in a subdirectory, as
example try right clicking on 'src' directory of qgit project.
Thanks
Marco
On Tue, Oct 7, 2008 at 1:36 PM, Abdelrazak Younes[off-list ref] wrote:
quoted
quoted
Sound like a problem of startup directory: on the command line you
start from the right directory...when you double click on which repo
qgit is open ?
None of course. But when I open a repository manually I would expect that
this is properly filled in.
In git.cpp, Git::userInfo() function get info about user by means of
'git config' calls, my guess (I cannot it test now) is that 'git
config' does not work if we are not in a git directory.
OK, I'll have a look, thanks.
quoted
And if I launch qgit with the context menu (right clicking a directory in
the Explorer), qgit never managed to open the repository.
This is a bug that I never managed to get rid of :-(
It is strange because it works if you try in a subdirectory, as
example try right clicking on 'src' directory of qgit project.
I tried and it doesn't work this way either; the statusbar tells me that
this is 'Not a git archive' :-(
Abdel.
On Tue, Oct 7, 2008 at 1:36 PM, Abdelrazak Younes[off-list ref] wrote:
quoted
quoted
Sound like a problem of startup directory: on the command line you
start from the right directory...when you double click on which repo
qgit is open ?
None of course. But when I open a repository manually I would expect that
this is properly filled in.
In git.cpp, Git::userInfo() function get info about user by means of
'git config' calls, my guess (I cannot it test now) is that 'git
config' does not work if we are not in a git directory.
No, 'git config user.name' works fine in any directory, even on the
naked Windows console (I mean without msys bash). So that must be
something else. I've traced it down to
MyProcess::on_finished().
isErrorExit = (exitStatus != QProcess::NormalExit)
|| (exitCode != 0 && isWinShell)
|| !errorDesc.isEmpty()
|| canceling;
At this point we have:
exitStatus = NormalExit
exitCode = 1
isWinShell = false
errorDesc.isEmpty() returns true
canceling = false
Which gives 'isErrorExit = false'. I wonder if the isWinShell test is
correct?
Abdel.
On Tue, Oct 7, 2008 at 1:36 PM, Abdelrazak Younes[off-list ref] wrote:
quoted
quoted
Sound like a problem of startup directory: on the command line you
start from the right directory...when you double click on which repo
qgit is open ?
None of course. But when I open a repository manually I would expect that
this is properly filled in.
In git.cpp, Git::userInfo() function get info about user by means of
'git config' calls, my guess (I cannot it test now) is that 'git
config' does not work if we are not in a git directory.
OK, with this patch, I see that the local config request is apparently
successful even though the 'user' and 'email' strings stay empty.
OTOH, the two global config requests fail.
---
src/git.cpp | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
From: Marco Costalba <hidden> Date: 2016-06-15 22:45:27
On Tue, Oct 7, 2008 at 2:31 PM, Abdelrazak Younes [off-list ref] wrote:
No, 'git config user.name' works fine in any directory, even on the naked
Windows console (I mean without msys bash). So that must be something else.
I've traced it down to
MyProcess::on_finished().
isErrorExit = (exitStatus != QProcess::NormalExit)
|| (exitCode != 0 && isWinShell)
|| !errorDesc.isEmpty()
|| canceling;
At this point we have:
exitStatus = NormalExit
exitCode = 1
isWinShell = false
errorDesc.isEmpty() returns true
canceling = false
Which gives 'isErrorExit = false'. I wonder if the isWinShell test is
correct?
Hi Abdel,
I would think it is correct to return isErrorExit == false
The problem is that it seems git config return empty data if run from
outside git directory...isn't it ?
Marco
From: Marco Costalba <hidden> Date: 2016-06-15 22:45:27
On Tue, Oct 7, 2008 at 3:10 PM, Abdelrazak Younes [off-list ref] wrote:
OK, with this patch, I see that the local config request is apparently
successful even though the 'user' and 'email' strings stay empty.
An empty user and email it does not mean failure. Again, I would think
that is git config that returns no data (without failing) if it is run
from outside git directory.
From: Marco Costalba <hidden> Date: 2016-06-15 22:45:27
On Tue, Oct 7, 2008 at 6:50 PM, Marco Costalba [off-list ref] wrote:
An empty user and email it does not mean failure. Again, I would think
that is git config that returns no data (without failing) if it is run
from outside git directory.
Yes ! it is like this, I have finally had the possibility to test.
git config does not returns user and mail if run outside git dir
because user and mail are local set.
On Tue, Oct 7, 2008 at 2:31 PM, Abdelrazak Younes[off-list ref] wrote:
quoted
No, 'git config user.name' works fine in any directory, even on the naked
Windows console (I mean without msys bash). So that must be something else.
I've traced it down to
MyProcess::on_finished().
isErrorExit = (exitStatus != QProcess::NormalExit)
|| (exitCode != 0&& isWinShell)
|| !errorDesc.isEmpty()
|| canceling;
At this point we have:
exitStatus = NormalExit
exitCode = 1
isWinShell = false
errorDesc.isEmpty() returns true
canceling = false
Which gives 'isErrorExit = false'. I wonder if the isWinShell test is
correct?
Hi Abdel,
I would think it is correct to return isErrorExit == false
OK.
The problem is that it seems git config return empty data if run from
outside git directory...isn't it ?
No, as I said, 'git config user.name' is working just fine outside git
directory.
Abdel.
On Tue, Oct 7, 2008 at 3:10 PM, Abdelrazak Younes[off-list ref] wrote:
quoted
OK, with this patch, I see that the local config request is apparently
successful even though the 'user' and 'email' strings stay empty.
An empty user and email it does not mean failure.
Yes, I know that but what is troublesome is that the user and email are
not empty when git config is called outside of qgit.
What is even more troublesome is that the two calls to 'git config
--global user.xxx' fail (but don't fail when called manually at the
command line).
Abdel.
On Tue, Oct 7, 2008 at 6:50 PM, Marco Costalba[off-list ref] wrote:
quoted
An empty user and email it does not mean failure. Again, I would think
that is git config that returns no data (without failing) if it is run
from outside git directory.
Yes ! it is like this, I have finally had the possibility to test.
git config does not returns user and mail if run outside git dir
because user and mail are local set.
So how do you explain this:
C:\>git config --global user.name
Abdelrazak Younes
C:\>git config user.name
Abdelrazak Younes
I get the same result in any directory, git repo or not.
FYI, I never set the name locally, just once and globally.
Abdel.
From: Marco Costalba <hidden> Date: 2016-06-15 22:45:27
On Tue, Oct 7, 2008 at 6:38 PM, Abdelrazak Younes [off-list ref] wrote:
So how do you explain this:
Form git-config(1) docs:
This command will fail if:
-The config file is invalid,
......
-you use --global option without $HOME being properly set.
So please try to comment out following line
--- a/src/git.cpp+++ b/src/git.cpp
@@ -345,7 +345,7 @@ void Git::userInfo(SList info) {info.clear();info<<"Environment"<<user<<email;-errorReportingEnabled=false;// 'git config' could fail, see docs+//errorReportingEnabled = false; // 'git config' could fail, see docsrun("git config user.name",&user);run("git config user.email",&email);
run from double click and you probably will see an error message box
where git says $HOME is not set (I can reproduce this now).
So what I think is that when you run from command line there is the
$HOME variable set and command does not fails.
Marco
On Tue, Oct 7, 2008 at 6:38 PM, Abdelrazak Younes[off-list ref] wrote:
quoted
So how do you explain this:
Form git-config(1) docs:
This command will fail if:
-The config file is invalid,
......
-you use --global option without $HOME being properly set.
So please try to comment out following line
--- a/src/git.cpp+++ b/src/git.cpp
@@ -345,7 +345,7 @@ void Git::userInfo(SList info) {info.clear();info<<"Environment"<<user<<email;-errorReportingEnabled=false;// 'git config' could fail, see docs+//errorReportingEnabled = false; // 'git config' could fail, see docsrun("git config user.name",&user);run("git config user.email",&email);
run from double click and you probably will see an error message box
where git says $HOME is not set (I can reproduce this now).
Right!
So what I think is that when you run from command line there is the
$HOME variable set and command does not fails.
I see... but the only variable I have is HOMEPATH:
HOMEPATH=\Users\abdel
So I guess this was set by msysgit at installation time. But I see this
variable only at the console (after typing 'set'), I don't see it in the
user environment variable nor in the system one. So I guess the fix
would be for msysgit to create this entry?
Thanks,
Abdel.
From: Marco Costalba <hidden> Date: 2016-06-15 22:45:27
On Tue, Oct 7, 2008 at 7:20 PM, Abdelrazak Younes [off-list ref] wrote:
So I guess this was set by msysgit at installation time. But I see this
variable only at the console (after typing 'set'), I don't see it in the
user environment variable nor in the system one. So I guess the fix would be
for msysgit to create this entry?
Browsing git-config docs I would think that this variable is needed so
that git-config knows where to look for the git global configs file
that is under user $HOME directory, see the [FILES] section in git
config docs.
Thanks
Marco