Public bug reported:

Environment:
- Ubuntu lunar 23.04 with     gedit-plugin-git 44.1-2
- or Ubuntu mantic 23.10 with gedit-plugin-git 44.1-2

There is no issue when the user owns the parent folder where the .git
folder is located.

Now, let's consider

However, when the following conditions are met, no modified lines are 
highlighted rendering the git plugin useless:
- the user has only group R/W access to the file to modify it
- the user has only group R/W access to the .git folder
- the user has only group R/W access to the parent folder where the .git folder 
is located
- the user does not own the parent folder where the .git folder is located

Furthermore, the following errors are logged in syslog:

Nov  7 14:57:23 hostname gedit[1176655]: Traceback (most recent call last):
Nov  7 14:57:23 hostname gedit[1176655]:   File 
"/usr/lib/x86_64-linux-gnu/gedit/plugins/git/appactivatable.py", line 89, in 
get_repository
Nov  7 14:57:23 hostname gedit[1176655]:     repo = self.__git_repos[repo_uri]
Nov  7 14:57:23 hostname gedit[1176655]:            ~~~~~~~~~~~~~~~~^^^^^^^^^^
Nov  7 14:57:23 hostname gedit[1176655]: KeyError: 
'file:///<git_parent_folder>/.git'
Nov  7 14:57:23 hostname gedit[1176655]: During handling of the above 
exception, another exception occurred:
Nov  7 14:57:23 hostname gedit[1176655]: Traceback (most recent call last):
Nov  7 14:57:23 hostname gedit[1176655]:   File 
"/usr/lib/x86_64-linux-gnu/gedit/plugins/git/viewactivatable.py", line 116, in 
update_location
Nov  7 14:57:23 hostname gedit[1176655]:     repo = 
self.app_activatable.get_repository(self.location, False)
Nov  7 14:57:23 hostname gedit[1176655]:            
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov  7 14:57:23 hostname gedit[1176655]:   File 
"/usr/lib/x86_64-linux-gnu/gedit/plugins/git/appactivatable.py", line 92, in 
get_repository
Nov  7 14:57:23 hostname gedit[1176655]:     repo = 
Ggit.Repository.open(repo_file)
Nov  7 14:57:23 hostname gedit[1176655]:            
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov  7 14:57:23 hostname gedit[1176655]: gi.repository.GLib.GError: ggit-error: 
repository path '/<git_parent_folder>/' is not owned by current user (-36)

** Affects: gedit-plugins (Ubuntu)
     Importance: Undecided
         Status: New

** Summary changed:

- git plugin is ineffective when the user does not own the folder
+ git plugin is ineffective when the user does not own the git parent folder

** Summary changed:

- git plugin is ineffective when the user does not own the git parent folder
+ git plugin is ineffective when the user does not own the .git parent folder

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gedit-plugins in Ubuntu.
https://bugs.launchpad.net/bugs/2042950

Title:
  git plugin is ineffective when the user does not own the .git parent
  folder

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gedit-plugins/+bug/2042950/+subscriptions


-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to