Review Request 115232: Check that git configuration has user.email & user.name before allowing to use git.

Andreas Pakulat apaku at gmx.de
Thu Jan 23 10:02:48 UTC 2014



> On Jan. 22, 2014, 9:58 p.m., Aleix Pol Gonzalez wrote:
> > Still, I think that this check should be delayed, there's no reason to have it happening that early in the plugin execution. Also it shouldn't be blocking the execution (that is, drop waitForFinished calls).
> > 
> > What about calling a "GitPlugins::errorsFound()" instead? this way it wouldn't be blocking. I don't know if anybody is expecting to edit this from KDevelop.
> 
> Mikhail Krutov wrote:
>     >I don't know if anybody is expecting to edit this from KDevelop.
>     I didn't find a way to get the user email from within KDE code; especially if user does not have kmail/kdepim set up; thus I made an editable input-boxes.
>     Without the editing; should git be initialized to some sane default (like KUser::loginName() + @ "domain_name")?
>     
>

Maybe it should rather be investigated why initializing a repository through kdevelop and creating an initial commit does not use the users login and username as configured on the system? Standalone git does exactly what you propose if you do

git init
touch foo
git add foo
git commit -m "Initial Commit"

in a terminal. So there has to be some reason why the same sequence (I'm assuming its roughly the same) fails in KDevelop and by fixing that you're avoiding all the discussion around when to ask, what defaults to take etc. and simply leave it to git. That also means there's not going to be any confusion by users that occasionally use git from commandline and wonder why kdevelop proposes different values for these.


- Andreas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115232/#review48083
-----------------------------------------------------------


On Jan. 22, 2014, 9:51 p.m., Mikhail Krutov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115232/
> -----------------------------------------------------------
> 
> (Updated Jan. 22, 2014, 9:51 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> https://bugs.kde.org/show_bug.cgi?id=327931
> When user did not setup git config user.email && user.name, get current KUser.fullName & prompt user to enter his email.
> 
> 
> Diffs
> -----
> 
>   plugins/git/gitplugin.h 0d50dbe 
>   plugins/git/gitplugin.cpp abd7e7f 
> 
> Diff: https://git.reviewboard.kde.org/r/115232/diff/
> 
> 
> Testing
> -------
> 
> Install kdevgit.so plugin, then run KDevelop with empty ~/.gitconfig & with valid ~/.gitconfig
> This patch has an issue that KDialog is not an active window on KDevelop start (e.g. KDevelop takes WM focus).
> 
> 
> Thanks,
> 
> Mikhail Krutov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140123/b005b134/attachment-0001.html>


More information about the KDevelop-devel mailing list