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 2323Breaking changes:
2424
2525- 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 `
2730 `#803 <https://github.com/libgit2/pygit2/issues/803 >`_
2831
2932
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ Usage guide:
5050 settings
5151 submodule
5252 working-copy
53+ worktree
5354
5455
5556Indices 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)
5050 return to_unicode (git_worktree_path (self -> worktree ), NULL , NULL );
5151}
5252
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-
6153PyDoc_STRVAR (Worktree_is_prunable__doc__ ,
6254 "Is the worktree prunable with the given set of flags?\n" );
6355PyObject *
@@ -105,7 +97,6 @@ PyMethodDef Worktree_methods[] = {
10597
10698PyGetSetDef Worktree_getseters [] = {
10799 GETTER (Worktree , path ),
108- GETTER (Worktree , git_path ),
109100 GETTER (Worktree , name ),
110101 GETTER (Worktree , is_prunable ),
111102 {NULL }
Original file line number Diff line number Diff line change 3333#include <git2.h>
3434#include <git2/worktree.h>
3535
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-
4736PyObject * wrap_worktree (Repository * repo , git_worktree * wt );
4837
4938#endif
Original file line number Diff line number Diff line change @@ -696,15 +696,6 @@ def _check_worktree(worktree):
696696 # file.
697697 assert os .path .isfile (os .path .join (worktree_dir , '.git' ))
698698
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-
708699 # We should have zero worktrees
709700 assert self .repo .list_worktrees () == []
710701 # Add a worktree
@@ -726,5 +717,3 @@ def _check_worktree(worktree):
726717 # something to take up with libgit2.
727718 worktree .prune (True )
728719 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