File tree Expand file tree Collapse file tree 6 files changed +11
-32
lines changed Expand file tree Collapse file tree 6 files changed +11
-32
lines changed Original file line number Diff line number Diff line change 23
23
Breaking changes:
24
24
25
25
- Now `worktree.path ` returns the path to the worktree directory, not to the
26
- `.git ` file within. To get the path to the `.git ` file just append `.git `
26
+ `.git ` file within
27
+ `#803 <https://github.com/libgit2/pygit2/issues/803 >`_
28
+
29
+ - Remove undocumented `worktree.git_path `
27
30
`#803 <https://github.com/libgit2/pygit2/issues/803 >`_
28
31
29
32
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ Usage guide:
50
50
settings
51
51
submodule
52
52
working-copy
53
+ worktree
53
54
54
55
55
56
Indices and tables
Original file line number Diff line number Diff line change
1
+ **********************************************************************
2
+ Worktree
3
+ **********************************************************************
4
+
5
+ .. autoclass :: pygit2.Worktree
6
+ :members:
Original file line number Diff line number Diff line change @@ -50,14 +50,6 @@ Worktree_path__get__(Worktree *self)
50
50
return to_unicode (git_worktree_path (self -> worktree ), NULL , NULL );
51
51
}
52
52
53
- PyDoc_STRVAR (Worktree_git_path__doc__ ,
54
- "Gets dir within .git path\n" );
55
- PyObject *
56
- Worktree_git_path__get__ (Worktree * self )
57
- {
58
- return to_unicode (self -> worktree -> gitdir_path , NULL , NULL );
59
- }
60
-
61
53
PyDoc_STRVAR (Worktree_is_prunable__doc__ ,
62
54
"Is the worktree prunable with the given set of flags?\n" );
63
55
PyObject *
@@ -105,7 +97,6 @@ PyMethodDef Worktree_methods[] = {
105
97
106
98
PyGetSetDef Worktree_getseters [] = {
107
99
GETTER (Worktree , path ),
108
- GETTER (Worktree , git_path ),
109
100
GETTER (Worktree , name ),
110
101
GETTER (Worktree , is_prunable ),
111
102
{NULL }
Original file line number Diff line number Diff line change 33
33
#include <git2.h>
34
34
#include <git2/worktree.h>
35
35
36
- /* git_worktree is an internal unstable datastructure (#803) */
37
- struct git_worktree {
38
- char * name ;
39
- char * worktree_path ;
40
- char * gitlink_path ;
41
- char * gitdir_path ;
42
- char * commondir_path ;
43
- char * parent_path ;
44
- int locked :1 ;
45
- };
46
-
47
36
PyObject * wrap_worktree (Repository * repo , git_worktree * wt );
48
37
49
38
#endif
Original file line number Diff line number Diff line change @@ -696,15 +696,6 @@ def _check_worktree(worktree):
696
696
# file.
697
697
assert os .path .isfile (os .path .join (worktree_dir , '.git' ))
698
698
699
- # Confirm the git_path attribute points to the correct path
700
- git_path = os .path .realpath (
701
- os .path .join (self .repo .path , 'worktrees' , worktree_name ))
702
- assert os .path .realpath (worktree .git_path ) == git_path
703
-
704
- # Confirm the worktree directory in the main checkout's gitdir
705
- # actually exists
706
- assert os .path .isdir (git_path )
707
-
708
699
# We should have zero worktrees
709
700
assert self .repo .list_worktrees () == []
710
701
# Add a worktree
@@ -726,5 +717,3 @@ def _check_worktree(worktree):
726
717
# something to take up with libgit2.
727
718
worktree .prune (True )
728
719
assert self .repo .list_worktrees () == []
729
- # Confirm that the repo's data dir has been removed
730
- assert not os .path .isdir (worktree .git_path )
You can’t perform that action at this time.
0 commit comments