git-ubuntu support for worktrees
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-ubuntu |
Triaged
|
Medium
|
Unassigned |
Bug Description
I like using worktrees to work on more complex packages, and I've just noticed that "git ubuntu prepare-upload args" doesn't work when inside one.
This is what I see:
--git-
Traceback (most recent call last):
File "/snap/
load_
File "/snap/
sys.
File "/snap/
repo = gitubuntu.
File "/snap/
self.raw_repo = pygit2.
File "/snap/
check_
File "/snap/
raise ValueError(message)
ValueError: failed to make directory '/home/
The problem happens because of how GitUbuntuRepository is initialized:
https:/
try:
except FileExistsError:
if local_dir_list and os.getenv(
) not in local_dir_list:
It assumes that ".git" will always be a directory, but inside worktrees ".git" is actually a regular file.
tags: | added: workflow |
Changed in git-ubuntu: | |
status: | New → Triaged |
importance: | Undecided → Medium |