Skip to content

Commit

Permalink
[Diff][Fixed] Problems when trying to use an already existent worktree
Browse files Browse the repository at this point in the history
Fixes #555
  • Loading branch information
set-soft committed Jan 15, 2024
1 parent d431a3b commit 8a69f03
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Diff
- `current`: didn't apply global variants
- `current`: didn't honor KiCad native DNP flags, they need a filter
- Problems when trying to use an already existent worktree (#555)
- PCB Print:
- Issues when forcing the board edge and using scaling (#532)
- Text not searchable when using newer rsvg-convert tools (#552)
Expand Down
2 changes: 1 addition & 1 deletion kibot/out_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def cache_git(self, name):
name = self.solve_git_name(name)
git_tmp_wd = mkdtemp()
logger.debug('Checking out '+name+' to '+git_tmp_wd)
self.run_git(['worktree', 'add', git_tmp_wd, name])
self.run_git(['worktree', 'add', '--force', git_tmp_wd, name])
self._worktrees_to_remove.append(git_tmp_wd)
self.run_git(['submodule', 'update', '--init', '--recursive'], cwd=git_tmp_wd)
name_copy = self.run_git(['ls-files', '--full-name', self.file])
Expand Down
2 changes: 1 addition & 1 deletion kibot/out_kiri.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def run(self, name):
rmtree(dst_dir)
git_tmp_wd = mkdtemp()
logger.debug('Checking out '+hash+' to '+git_tmp_wd)
self.run_git(['worktree', 'add', git_tmp_wd, hash])
self.run_git(['worktree', 'add', '--force', git_tmp_wd, hash])
self.run_git(['submodule', 'update', '--init', '--recursive'], cwd=git_tmp_wd)
# Generate SVGs for the schematic
name_sch = self.do_cache(self.sch_rel_name, git_tmp_wd, hash)
Expand Down

0 comments on commit 8a69f03

Please sign in to comment.