git-project-core-plugins 0.1.2__tar.gz → 0.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/PKG-INFO +8 -2
  2. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/_version.py +2 -2
  3. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/docs/changelog.rst +20 -1
  4. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/docs/index.rst +1 -0
  5. git_project_core_plugins-0.1.4/docs/umbrella.rst +78 -0
  6. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/requirements.txt +1 -1
  7. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/src/git_project_core_plugins/worktree.py +326 -57
  8. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/tests/test_worktree.py +834 -0
  9. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/.gitignore +0 -0
  10. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/COPYING +0 -0
  11. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/MANIFEST.in +0 -0
  12. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/changelog.d/README.rst +0 -0
  13. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/changelog.py +0 -0
  14. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/docs/Makefile +0 -0
  15. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/docs/authors.rst +0 -0
  16. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/docs/commands.rst +0 -0
  17. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/docs/conf.py +0 -0
  18. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/docs/contributing.rst +0 -0
  19. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/docs/intro.rst +0 -0
  20. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/docs/license.rst +0 -0
  21. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/docs/make.bat +0 -0
  22. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/hatch_build.py +0 -0
  23. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/pyproject.toml +0 -0
  24. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/src/git_project_core_plugins/__init__.py +0 -0
  25. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/src/git_project_core_plugins/_commanddocs.py +0 -0
  26. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/src/git_project_core_plugins/artifact.py +0 -0
  27. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/src/git_project_core_plugins/branch.py +0 -0
  28. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/src/git_project_core_plugins/clone.py +0 -0
  29. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/src/git_project_core_plugins/common.py +0 -0
  30. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/src/git_project_core_plugins/config.py +0 -0
  31. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/src/git_project_core_plugins/help.py +0 -0
  32. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/src/git_project_core_plugins/init.py +0 -0
  33. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/src/git_project_core_plugins/multirepo.py +0 -0
  34. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/src/git_project_core_plugins/run.py +0 -0
  35. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/tests/common.py +0 -0
  36. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/tests/conftest.py +0 -0
  37. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/tests/test_artifact.py +0 -0
  38. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/tests/test_branch.py +0 -0
  39. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/tests/test_changelog.py +0 -0
  40. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/tests/test_clone.py +0 -0
  41. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/tests/test_config.py +0 -0
  42. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/tests/test_help.py +0 -0
  43. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/tests/test_init.py +0 -0
  44. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/tests/test_multirepo.py +0 -0
  45. {git_project_core_plugins-0.1.2 → git_project_core_plugins-0.1.4}/tests/test_run.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: git-project-core-plugins
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: The extensible stupid project manager - core functionality
5
5
  Author-email: "David A. Greene" <dag@obbligato.org>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
15
  Classifier: Topic :: Software Development :: Version Control :: Git
16
16
  Requires-Python: >=3.10
17
- Requires-Dist: git-project>=0.1.2
17
+ Requires-Dist: git-project>=0.1.4
18
18
  Requires-Dist: pygit2>=1.18.2
19
19
  Provides-Extra: test
20
20
  Requires-Dist: git-project; extra == 'test'
@@ -689,6 +689,12 @@ flags say. Removing a worktree whose branch is unmerged requires ``-f``,
689
689
  unless ``--keep-branch`` means the branch survives anyway. When <name> has
690
690
  no worktree record, as after an ``rm`` that stopped part way, ``worktree
691
691
  rm`` removes each path record that names <name> and changes nothing else.
692
+ When the worktree record of <name> has no path, it removes that record and
693
+ each path record that names <name>, and again changes nothing else. When
694
+ the record has a path but no branch, ``worktree rm`` removes the worktree
695
+ and keeps every branch. While the directory exists, it needs ``-f`` or
696
+ ``--keep-branch``, unless ``--multirepo`` already keeps the branch.
697
+ ``worktree rm`` refuses a worktree moved with ``git worktree move``.
692
698
 
693
699
  With ``--check``, ``worktree add`` and ``worktree rm`` make the checks
694
700
  they would make before changing anything, report the result and change
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.1.2'
22
- __version_tuple__ = version_tuple = (0, 1, 2)
21
+ __version__ = version = '0.1.4'
22
+ __version_tuple__ = version_tuple = (0, 1, 4)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -31,6 +31,23 @@ ChangeLog
31
31
  `Unreleased`_
32
32
  -------------
33
33
 
34
+ `0.1.4`_ - 2026-11-21
35
+ ---------------------
36
+ Fixed
37
+ .....
38
+ - ``clone --worktree`` of an empty repository now adds the main worktree on an unborn branch, the one the remote's HEAD names. Before, it repeated a prompt for a main branch that no answer could match. A ``clone --worktree`` that fails partway now removes what it made. A ``clone --worktree`` into a directory that already has a ``.git`` now fails, where before it overwrote the ``.git``. With no input to read, the prompt for a main branch now fails with a one-line error rather than a traceback.
39
+ - ``clone --worktree`` and ``init --worktree`` now check out a main branch with a ``/`` in its name, such as ``release/1``, in the main worktree. Before, they created a new branch named after the last part of the name, ``1``, and checked that out.
40
+ - ``worktree rm <name>`` now finishes for a worktree that ``git worktree remove`` has already removed. Before, it removed the records, then stopped with a ``NotFoundError`` and left the branch. When the branch is gone too, it no longer needs ``-f``, and it says that any copies of the branch on remotes are kept.
41
+ - ``worktree rm <name>`` now removes a worktree whose record has a path but no branch, such as one edited by hand, and keeps every branch. While the worktree's directory exists, it needs ``-f`` or ``--keep-branch``. Before, it stopped with an ``AttributeError``. ``worktree rm`` now refuses a worktree moved with ``git worktree move``, before it changes anything. Before, it removed the records and then failed, leaving the moved directory.
42
+
43
+ `0.1.3`_ - 2026-11-17
44
+ ---------------------
45
+ Fixed
46
+ .....
47
+ - ``Worktree.rm`` now leaves a branch alone on every remote when the local branch is gone, since a remote may hold the only copy of its commits. Before, it raised ``NotFoundError`` or deleted the remote copies, depending on the project's other branches.
48
+ - ``worktree rm -f <name>`` now removes a worktree whose branch is gone, and leaves the branch alone on every remote, saying so. Without ``-f`` or ``--keep-branch`` it fails with a one-line error that names the branch. Before, both stopped with a traceback.
49
+ - ``worktree rm <name>`` now removes the worktree record of ``<name>`` when that record has no path, as after an ``rm`` that stopped part way through the record's keys, along with each path record that names ``<name>``. It changes no other config and removes no files or branches. Before, it failed with a ``TypeError`` and left both records in place. With ``--multirepo`` it does so only when the record still names the set, and otherwise stops with an error.
50
+
34
51
  `0.1.2`_ - 2026-10-22
35
52
  ---------------------
36
53
  Changed
@@ -298,7 +315,9 @@ Fixed
298
315
  404. Issues named ``unknown/greened``, a leftover from hatch's project
299
316
  template, and Documentation misspelled the package name.
300
317
 
301
- .. _Unreleased: https://github.com/greened/git-project-core-plugins/compare/v0.1.2...HEAD
318
+ .. _Unreleased: https://github.com/greened/git-project-core-plugins/compare/v0.1.4...HEAD
319
+ .. _0.1.4: https://github.com/greened/git-project-core-plugins/compare/v0.1.3...v0.1.4
320
+ .. _0.1.3: https://github.com/greened/git-project-core-plugins/compare/v0.1.2...v0.1.3
302
321
  .. _0.1.2: https://github.com/greened/git-project-core-plugins/compare/v0.1.1...v0.1.2
303
322
  .. _0.1.1: https://github.com/greened/git-project-core-plugins/compare/v0.1.0...v0.1.1
304
323
  .. _0.1.0: https://github.com/greened/git-project-core-plugins/compare/v0.0.33...v0.1.0
@@ -35,6 +35,7 @@ Welcome to git-project-core-plugins' documentation!
35
35
 
36
36
  intro.rst
37
37
  commands.rst
38
+ umbrella.rst
38
39
  contributing.rst
39
40
  authors.rst
40
41
  changelog.rst
@@ -0,0 +1,78 @@
1
+ ..
2
+ SPDX-FileCopyrightText: 2026-present David A. Greene <dag@obbligato.org>
3
+
4
+ ..
5
+ SPDX-License-Identifier: AGPL-3.0-or-later
6
+
7
+ ..
8
+ Copyright 2026 David A. Greene
9
+
10
+ ..
11
+ This file is part of git-project
12
+
13
+ ..
14
+ git-project is free software: you can redistribute it and/or modify it under
15
+ the terms of the GNU Affero General Public License as published by the Free
16
+ Software Foundation, either version 3 of the License, or (at your option)
17
+ any later version.
18
+
19
+ ..
20
+ This program is distributed in the hope that it will be useful, but WITHOUT
21
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License
23
+ for more details.
24
+
25
+ ..
26
+ You should have received a copy of the GNU Affero General Public License
27
+ along with git-project. If not, see <https://www.gnu.org/licenses/>.
28
+
29
+ Umbrellas for other tools
30
+ =========================
31
+
32
+ This page is for a tool that works with an umbrella made by
33
+ git-project-core-plugins but does not use git-project itself. The
34
+ :doc:`intro` describes the layout. ``clone --worktree``, ``init
35
+ --worktree`` and ``worktree migrate`` make an umbrella, and ``git <project>
36
+ help worktree`` describes each.
37
+
38
+ An umbrella is one directory that holds a bare clone and its worktrees side
39
+ by side::
40
+
41
+ myrepo/
42
+ .git a file holding "gitdir: .myrepo.git"
43
+ .myrepo.git/ the bare repository
44
+ master/ a worktree on the main branch
45
+ topic/ a worktree on branch topic
46
+
47
+ The bare repository is named for the last component of the remote's url,
48
+ with a leading ``.`` and a ``.git`` suffix added if the url has none. So
49
+ ``git@host:me/myrepo.git`` and ``https://host/me/myrepo`` both give
50
+ ``.myrepo.git``. It has ``core.bare`` set to true.
51
+
52
+ The ``.git`` file lets git run from the umbrella itself, where it sees the
53
+ bare repository. ``git log`` and ``git worktree list`` work there, but
54
+ ``git status`` does not, since the umbrella is not a checkout. The ``.git``
55
+ is a file, never a directory or a symlink.
56
+
57
+ Finding a checkout
58
+ ------------------
59
+
60
+ A tool can find its way around an umbrella without git-project:
61
+
62
+ - A directory ``D`` is an umbrella when ``D/.git`` is a file whose whole
63
+ content is ``gitdir: <name>`` and a newline, and ``D/<name>`` is the bare
64
+ repository.
65
+ - Inside a worktree, ``git rev-parse --path-format=absolute
66
+ --git-common-dir`` prints the bare repository's path. Its parent is the
67
+ umbrella if the test above passes.
68
+ - In the umbrella, ``git rev-parse --is-bare-repository`` prints ``true``
69
+ and ``git rev-parse --show-toplevel`` fails. Do not treat the umbrella as
70
+ a checkout.
71
+ - To find the checkout of a branch, read ``git -C D worktree list
72
+ --porcelain``. Skip the record marked ``bare``, which is the repository,
73
+ and match the line ``branch refs/heads/<branch>``. Do not build the path
74
+ from the branch name. A worktree lives wherever it was added, which can
75
+ be outside the umbrella.
76
+ - git-project records each worktree it makes in the repository's config, as
77
+ ``<project>.worktree.<name>.path``. A plain ``git worktree add`` leaves no
78
+ record, so ``git worktree list`` is the complete answer.
@@ -19,5 +19,5 @@
19
19
  # You should have received a copy of the GNU Affero General Public License along
20
20
  # with git-project. If not, see <https://www.gnu.org/licenses/>.
21
21
 
22
- git-project >= 0.1.2
22
+ git-project >= 0.1.4
23
23
  pygit2 >= 1.18.2