After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777899 - "Projects" view: "Author Details" from menu doesn't open if config file is in XDG_CONFIG_HOME
"Projects" view: "Author Details" from menu doesn't open if config file is in...
Status: RESOLVED OBSOLETE
Product: gitg
Classification: Applications
Component: gitg
3.22.x
Other Linux
: Normal minor
: ---
Assigned To: gitg-maint
gitg-maint
Depends on:
Blocks:
 
 
Reported: 2017-01-29 12:29 UTC by Christian Stadelmann
Modified: 2018-05-22 13:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Rely on libgit for global config files (1.46 KB, patch)
2017-01-29 13:33 UTC, Christian Stadelmann
none Details | Review
New version of the patch, with "From: " field fixed (1.50 KB, patch)
2017-05-15 18:45 UTC, Christian Stadelmann
none Details | Review

Description Christian Stadelmann 2017-01-29 12:29:19 UTC
According to bug report #760119 this issue should be fixed in the 3.22 release branch, but under certain conditions it still happens:

Steps to reproduce:
0. have a ~/.config/git/config but no ~/.gitconfig file (*)
1. open gitg
2. open the sandwich menu
3. click on "Author Details"

What happens:
Nothing. No dialog is openend. No warnings on console, not even with G_MESSAGES_DEBUG=all set.

What should happen:
Open dialog to input user name + email address.


Additional info:
(*) git supports having its config file in XDG_CONFIG_HOME since version 1.7.12 released in August 2012.
Instead of the fix you did, https://git.gnome.org/browse/gitg/commit/?id=09c661254af0ceaf05e97eab59a0c481fe9adeb0, how about leaving the config file creation to git/libgit? See also the docs in https://github.com/libgit2/libgit2/blob/89c332e41b12a72d89de40d63bc568c56a2c336a/include/git2/config.h#L250 and https://libgit2.github.com/libgit2/#HEAD/group/config/git_config_open_default

Installed software versions:
gitg-3.22.0-2.fc25.x86_64
libgit2-glib-0.24.4-2.fc25.x86_64
git-core-2.9.3-2.fc25.x86_64
glib2-2.50.2-1.fc25.x86_64
Comment 1 Christian Stadelmann 2017-01-29 13:33:40 UTC
Created attachment 344484 [details] [review]
Rely on libgit for global config files

Workaround:
Move your ~/.config/git/config file back to ~/.gitconfig or place a symlink instead.

The attached patch fixes the bug for me and also gets rid of unnecessary hardcoded paths.

Tested usecases:
* ~/.config/git/config present, ~/.gitconfig missing
* ~/.config/git/config present, ~/.gitconfig present
* ~/.config/git/config missing, ~/.gitconfig missing
* ~/.config/git/config missing, ~/.gitconfig present

Additional info:
Even with this patch, gitg will still save changes to the config to ~/.gitconfig, even if ~/.config/git/config is present. It seems like this behavior is intended.
Comment 2 Christian Stadelmann 2017-05-15 18:45:15 UTC
Created attachment 351919 [details] [review]
New version of the patch, with "From: " field fixed
Comment 3 GNOME Infrastructure Team 2018-05-22 13:18:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gitg/issues/68.