git-nested 1.1.0__tar.gz → 1.2.0__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 (205) hide show
  1. {git_nested-1.1.0 → git_nested-1.2.0}/.fish.rc +4 -3
  2. git_nested-1.2.0/.github/ISSUE_TEMPLATE/bug_report.md +23 -0
  3. git_nested-1.2.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  4. git_nested-1.2.0/.github/ISSUE_TEMPLATE/feature_request.md +15 -0
  5. git_nested-1.2.0/.github/PULL_REQUEST_TEMPLATE.md +17 -0
  6. git_nested-1.2.0/.github/dependabot.yml +23 -0
  7. git_nested-1.2.0/.github/release.yml +22 -0
  8. git_nested-1.2.0/.github/workflows/build-binary.yml +139 -0
  9. git_nested-1.2.0/.github/workflows/docs.yml +64 -0
  10. git_nested-1.2.0/.github/workflows/prune-artifacts.yml +57 -0
  11. {git_nested-1.1.0 → git_nested-1.2.0}/.github/workflows/publish.yml +6 -6
  12. {git_nested-1.1.0 → git_nested-1.2.0}/.github/workflows/release-binary.yml +43 -21
  13. {git_nested-1.1.0 → git_nested-1.2.0}/.github/workflows/test-binary.yml +8 -8
  14. git_nested-1.2.0/.github/workflows/test.yml +113 -0
  15. {git_nested-1.1.0 → git_nested-1.2.0}/.gitignore +2 -1
  16. {git_nested-1.1.0 → git_nested-1.2.0}/.pre-commit-config.yaml +5 -7
  17. {git_nested-1.1.0 → git_nested-1.2.0}/.rc +8 -2
  18. git_nested-1.2.0/CONTRIBUTING.md +19 -0
  19. git_nested-1.2.0/PKG-INFO +131 -0
  20. git_nested-1.2.0/README.md +105 -0
  21. git_nested-1.2.0/SECURITY.md +34 -0
  22. git_nested-1.2.0/bin/git-nested +39 -0
  23. git_nested-1.2.0/doc/README.md +60 -0
  24. git_nested-1.2.0/doc/_static/custom.css +102 -0
  25. git_nested-1.2.0/doc/_static/custom.js +40 -0
  26. git_nested-1.2.0/doc/_templates/layout.html +19 -0
  27. git_nested-1.2.0/doc/architecture/diagrams.md +860 -0
  28. git_nested-1.2.0/doc/architecture/index.md +127 -0
  29. git_nested-1.2.0/doc/cli/branch.md +94 -0
  30. git_nested-1.2.0/doc/cli/clean.md +53 -0
  31. git_nested-1.2.0/doc/cli/clone.md +121 -0
  32. git_nested-1.2.0/doc/cli/commit.md +53 -0
  33. git_nested-1.2.0/doc/cli/completion.md +47 -0
  34. git_nested-1.2.0/doc/cli/config.md +69 -0
  35. git_nested-1.2.0/doc/cli/diff.md +54 -0
  36. git_nested-1.2.0/doc/cli/environment-variables.md +19 -0
  37. git_nested-1.2.0/doc/cli/fetch.md +59 -0
  38. git_nested-1.2.0/doc/cli/index.md +139 -0
  39. git_nested-1.2.0/doc/cli/init.md +103 -0
  40. git_nested-1.2.0/doc/cli/pull.md +130 -0
  41. git_nested-1.2.0/doc/cli/push.md +141 -0
  42. git_nested-1.2.0/doc/cli/repair.md +54 -0
  43. git_nested-1.2.0/doc/cli/run.md +42 -0
  44. git_nested-1.2.0/doc/cli/status.md +87 -0
  45. git_nested-1.2.0/doc/cli/version.md +29 -0
  46. git_nested-1.2.0/doc/concepts/comparison.md +63 -0
  47. git_nested-1.2.0/doc/concepts/glossary.md +81 -0
  48. git_nested-1.2.0/doc/concepts/how-it-works.md +163 -0
  49. git_nested-1.2.0/doc/conf.py +119 -0
  50. git_nested-1.2.0/doc/configuration/git-config.md +43 -0
  51. git_nested-1.2.0/doc/configuration/gitnested-file.md +137 -0
  52. git_nested-1.2.0/doc/contributing/development.md +116 -0
  53. git_nested-1.2.0/doc/contributing/documentation.md +81 -0
  54. git_nested-1.2.0/doc/guides/adopt.md +45 -0
  55. git_nested-1.2.0/doc/guides/conflicts.md +83 -0
  56. git_nested-1.2.0/doc/guides/hooks-and-signing.md +47 -0
  57. git_nested-1.2.0/doc/guides/many.md +79 -0
  58. git_nested-1.2.0/doc/guides/nested-in-nested.md +55 -0
  59. git_nested-1.2.0/doc/guides/partial.md +66 -0
  60. git_nested-1.2.0/doc/guides/pin.md +53 -0
  61. git_nested-1.2.0/doc/guides/squash-merges.md +54 -0
  62. git_nested-1.2.0/doc/guides/submodules.md +49 -0
  63. git_nested-1.2.0/doc/index.md +185 -0
  64. git_nested-1.2.0/doc/introduction/index.md +69 -0
  65. git_nested-1.2.0/doc/introduction/install.md +158 -0
  66. git_nested-1.2.0/doc/quickstart/05-minutes.md +222 -0
  67. git_nested-1.2.0/doc/quickstart/everyday.md +105 -0
  68. git_nested-1.2.0/man/man1/git-nested.1 +199 -0
  69. git_nested-1.2.0/pyproject.toml +243 -0
  70. git_nested-1.2.0/scripts/create-python-exe.sh +257 -0
  71. {git_nested-1.1.0 → git_nested-1.2.0}/sonar-project.properties +3 -3
  72. git_nested-1.2.0/src/git_nested/__init__.py +34 -0
  73. git_nested-1.2.0/src/git_nested/__main__.py +10 -0
  74. git_nested-1.2.0/src/git_nested/_compat.py +49 -0
  75. git_nested-1.2.0/src/git_nested/_version.py +21 -0
  76. git_nested-1.2.0/src/git_nested/checks.py +95 -0
  77. git_nested-1.2.0/src/git_nested/cli/__init__.py +3 -0
  78. git_nested-1.2.0/src/git_nested/cli/app.py +80 -0
  79. git_nested-1.2.0/src/git_nested/cli/location.py +108 -0
  80. git_nested-1.2.0/src/git_nested/cli/main.py +20 -0
  81. git_nested-1.2.0/src/git_nested/cli/parser.py +154 -0
  82. git_nested-1.2.0/src/git_nested/cli/setup.py +77 -0
  83. git_nested-1.2.0/src/git_nested/cli/spec.py +430 -0
  84. git_nested-1.2.0/src/git_nested/commands/__init__.py +53 -0
  85. git_nested-1.2.0/src/git_nested/commands/branch.py +133 -0
  86. git_nested-1.2.0/src/git_nested/commands/clean.py +81 -0
  87. git_nested-1.2.0/src/git_nested/commands/clone.py +231 -0
  88. git_nested-1.2.0/src/git_nested/commands/commit.py +37 -0
  89. git_nested-1.2.0/src/git_nested/commands/completion.py +14 -0
  90. git_nested-1.2.0/src/git_nested/commands/config.py +68 -0
  91. git_nested-1.2.0/src/git_nested/commands/diff.py +33 -0
  92. git_nested-1.2.0/src/git_nested/commands/fetch.py +78 -0
  93. git_nested-1.2.0/src/git_nested/commands/init.py +104 -0
  94. git_nested-1.2.0/src/git_nested/commands/pull.py +247 -0
  95. git_nested-1.2.0/src/git_nested/commands/push.py +282 -0
  96. git_nested-1.2.0/src/git_nested/commands/repair.py +53 -0
  97. git_nested-1.2.0/src/git_nested/commands/run.py +36 -0
  98. git_nested-1.2.0/src/git_nested/commands/status.py +145 -0
  99. git_nested-1.2.0/src/git_nested/commands/version.py +23 -0
  100. git_nested-1.2.0/src/git_nested/completion/__init__.py +246 -0
  101. git_nested-1.2.0/src/git_nested/completion/scripts.py +210 -0
  102. git_nested-1.2.0/src/git_nested/constants.py +13 -0
  103. git_nested-1.2.0/src/git_nested/content.py +162 -0
  104. git_nested-1.2.0/src/git_nested/discovery.py +102 -0
  105. git_nested-1.2.0/src/git_nested/errors.py +18 -0
  106. git_nested-1.2.0/src/git_nested/filters.py +117 -0
  107. git_nested-1.2.0/src/git_nested/git.py +103 -0
  108. git_nested-1.2.0/src/git_nested/gitfile.py +147 -0
  109. git_nested-1.2.0/src/git_nested/history.py +353 -0
  110. git_nested-1.2.0/src/git_nested/messages.py +111 -0
  111. git_nested-1.2.0/src/git_nested/models.py +138 -0
  112. git_nested-1.2.0/src/git_nested/output.py +211 -0
  113. git_nested-1.2.0/src/git_nested/py.typed +0 -0
  114. git_nested-1.2.0/src/git_nested/refs.py +111 -0
  115. git_nested-1.2.0/src/git_nested/submodules.py +58 -0
  116. git_nested-1.2.0/src/git_nested/worktree.py +74 -0
  117. git_nested-1.2.0/src/git_nested/yamlio.py +25 -0
  118. git_nested-1.2.0/src/git_nested.egg-info/PKG-INFO +131 -0
  119. git_nested-1.2.0/src/git_nested.egg-info/SOURCES.txt +172 -0
  120. git_nested-1.2.0/src/git_nested.egg-info/requires.txt +1 -0
  121. git_nested-1.2.0/src/git_nested.egg-info/scm_file_list.json +168 -0
  122. git_nested-1.2.0/src/git_nested.egg-info/scm_version.json +8 -0
  123. {git_nested-1.1.0/test → git_nested-1.2.0/tests}/conftest.py +160 -42
  124. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/scenarios/test_extraction.py +5 -6
  125. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/scenarios/test_filemode.py +24 -7
  126. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/scenarios/test_filter.py +71 -16
  127. git_nested-1.2.0/tests/e2e/test_branch.py +577 -0
  128. git_nested-1.2.0/tests/e2e/test_clean.py +94 -0
  129. git_nested-1.2.0/tests/e2e/test_clone.py +261 -0
  130. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/test_commit.py +26 -5
  131. git_nested-1.2.0/tests/e2e/test_completion.py +224 -0
  132. git_nested-1.2.0/tests/e2e/test_config.py +145 -0
  133. git_nested-1.2.0/tests/e2e/test_detached.py +21 -0
  134. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/test_diff.py +29 -25
  135. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/test_encode.py +18 -12
  136. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/test_error.py +54 -52
  137. git_nested-1.2.0/tests/e2e/test_exclude.py +75 -0
  138. git_nested-1.2.0/tests/e2e/test_fetch.py +60 -0
  139. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/test_gitignore.py +2 -2
  140. git_nested-1.2.0/tests/e2e/test_init.py +129 -0
  141. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/test_nested_in_nested.py +78 -35
  142. git_nested-1.2.0/tests/e2e/test_non_ascii.py +24 -0
  143. git_nested-1.2.0/tests/e2e/test_pin.py +51 -0
  144. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/test_pull.py +227 -52
  145. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/test_push.py +364 -33
  146. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/test_rebase.py +7 -12
  147. git_nested-1.2.0/tests/e2e/test_reclone.py +141 -0
  148. git_nested-1.2.0/tests/e2e/test_repair.py +196 -0
  149. git_nested-1.2.0/tests/e2e/test_run.py +73 -0
  150. git_nested-1.2.0/tests/e2e/test_signing.py +42 -0
  151. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/test_status.py +56 -18
  152. git_nested-1.2.0/tests/e2e/test_subdirectory.py +160 -0
  153. {git_nested-1.1.0/test → git_nested-1.2.0/tests/e2e}/test_submodule.py +4 -1
  154. git_nested-1.2.0/tests/e2e/test_submodules.py +123 -0
  155. git_nested-1.2.0/tests/e2e/test_upstream_path.py +64 -0
  156. git_nested-1.2.0/tests/e2e/test_version.py +28 -0
  157. git_nested-1.2.0/tests/unit/conftest.py +37 -0
  158. git_nested-1.2.0/tests/unit/fakes.py +74 -0
  159. git_nested-1.2.0/tests/unit/test_adopt.py +145 -0
  160. git_nested-1.2.0/tests/unit/test_command.py +157 -0
  161. git_nested-1.2.0/tests/unit/test_completion_engine.py +332 -0
  162. git_nested-1.2.0/tests/unit/test_docs.py +98 -0
  163. git_nested-1.2.0/tests/unit/test_helpers.py +246 -0
  164. git_nested-1.2.0/tests/unit/test_logging.py +231 -0
  165. git_nested-1.2.0/tests/unit/test_repo_business.py +568 -0
  166. git_nested-1.2.0/uv.lock +2020 -0
  167. git_nested-1.1.0/.github/workflows/build-binary.yml +0 -78
  168. git_nested-1.1.0/.github/workflows/test.yml +0 -73
  169. git_nested-1.1.0/CONTRIBUTING.md +0 -229
  170. git_nested-1.1.0/PKG-INFO +0 -463
  171. git_nested-1.1.0/README.md +0 -437
  172. git_nested-1.1.0/docs/diagrams.md +0 -470
  173. git_nested-1.1.0/lib/git-nested +0 -13
  174. git_nested-1.1.0/lib/git_nested.egg-info/PKG-INFO +0 -463
  175. git_nested-1.1.0/lib/git_nested.egg-info/SOURCES.txt +0 -60
  176. git_nested-1.1.0/lib/git_nested.egg-info/requires.txt +0 -1
  177. git_nested-1.1.0/lib/git_nested.py +0 -2690
  178. git_nested-1.1.0/pyproject.toml +0 -156
  179. git_nested-1.1.0/scripts/create-python-exe.sh +0 -189
  180. git_nested-1.1.0/share/completion.bash +0 -44
  181. git_nested-1.1.0/share/enable-completion.sh +0 -35
  182. git_nested-1.1.0/share/git-nested.fish +0 -35
  183. git_nested-1.1.0/share/zsh-completion/_git-nested +0 -72
  184. git_nested-1.1.0/test/test_branch.py +0 -291
  185. git_nested-1.1.0/test/test_clean.py +0 -32
  186. git_nested-1.1.0/test/test_clone.py +0 -116
  187. git_nested-1.1.0/test/test_completion.py +0 -144
  188. git_nested-1.1.0/test/test_fetch.py +0 -34
  189. git_nested-1.1.0/test/test_init.py +0 -82
  190. git_nested-1.1.0/test/test_reclone.py +0 -38
  191. git_nested-1.1.0/test/test_version.py +0 -13
  192. git_nested-1.1.0/test/unittest/conftest.py +0 -62
  193. git_nested-1.1.0/test/unittest/test_command.py +0 -112
  194. git_nested-1.1.0/test/unittest/test_helpers.py +0 -174
  195. git_nested-1.1.0/test/unittest/test_logging.py +0 -159
  196. git_nested-1.1.0/test/unittest/test_repo_business.py +0 -492
  197. git_nested-1.1.0/uv.lock +0 -2237
  198. {git_nested-1.1.0 → git_nested-1.2.0}/.codecov.yml +0 -0
  199. {git_nested-1.1.0 → git_nested-1.2.0}/.gitattributes +0 -0
  200. {git_nested-1.1.0 → git_nested-1.2.0}/.github/CODEOWNERS +0 -0
  201. {git_nested-1.1.0 → git_nested-1.2.0}/LICENSE +0 -0
  202. {git_nested-1.1.0 → git_nested-1.2.0}/setup.cfg +0 -0
  203. {git_nested-1.1.0/lib → git_nested-1.2.0/src}/git_nested.egg-info/dependency_links.txt +0 -0
  204. {git_nested-1.1.0/lib → git_nested-1.2.0/src}/git_nested.egg-info/entry_points.txt +0 -0
  205. {git_nested-1.1.0/lib → git_nested-1.2.0/src}/git_nested.egg-info/top_level.txt +0 -0
@@ -11,7 +11,8 @@
11
11
  #------------------------------------------------------------------------------
12
12
 
13
13
  set GIT_NESTED_ROOT (dirname (realpath (status --current-filename)))
14
- set PATH $GIT_NESTED_ROOT/lib $PATH
14
+ set PATH $GIT_NESTED_ROOT/bin $PATH
15
15
 
16
- # Load git-nested completions
17
- source $GIT_NESTED_ROOT/share/git-nested.fish
16
+ # Tab completion. The script is generated by git-nested itself, from the
17
+ # same tables the argument parser is built from, so it can never drift.
18
+ git-nested completion fish | source
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Bug report
3
+ about: Something git-nested does that it should not
4
+ labels: bug
5
+ ---
6
+
7
+ ## What happened
8
+
9
+ <!-- Paste the command and its output. `-v` or `-d` output helps a lot. -->
10
+
11
+ ## What you expected instead
12
+
13
+ ## How to reproduce
14
+
15
+ <!-- The shortest sequence of commands that shows it, starting from an empty
16
+ repository if you can. -->
17
+
18
+ ## Versions
19
+
20
+ - git-nested: <!-- git nested --version -->
21
+ - git: <!-- git --version -->
22
+ - OS:
23
+ - Installed via: <!-- pip / standalone binary / source .rc -->
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Question or idea
4
+ url: https://github.com/thorsten-klein/git-nested/discussions
5
+ about: For anything that is not a bug report or a concrete feature request.
6
+ - name: Security vulnerability
7
+ url: https://github.com/thorsten-klein/git-nested/security/advisories/new
8
+ about: Report privately here, not as a public issue.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: Feature request
3
+ about: Something git-nested cannot do yet
4
+ labels: enhancement
5
+ ---
6
+
7
+ ## What you are trying to do
8
+
9
+ <!-- The workflow, not the feature. It often turns out there is already a way. -->
10
+
11
+ ## What you would like git-nested to do
12
+
13
+ <!-- If you have a command line in mind, write it out. -->
14
+
15
+ ## What you do instead today
@@ -0,0 +1,17 @@
1
+ ## What this changes
2
+
3
+ <!-- One or two sentences. What is different after this is merged? -->
4
+
5
+ ## Why
6
+
7
+ <!-- The problem it solves. Link the issue if there is one: Fixes #123 -->
8
+
9
+ ## Checklist
10
+
11
+ - [ ] `uv run poe all` passes (ruff, mypy, pyright, bandit, complexipy, and the
12
+ tests at 100% coverage)
13
+ - [ ] New behaviour has a test
14
+ - [ ] README / `--help` / the man page updated, if the change is visible to users
15
+ - [ ] The PR title reads as a [Conventional Commit](https://www.conventionalcommits.org)
16
+ (`feat:`, `fix:`, `docs:`, …) — it becomes the squash-merge commit message
17
+ and the changelog line
@@ -0,0 +1,23 @@
1
+ # Dependabot keeps the two things this repository pins up to date: the actions
2
+ # every workflow runs, and the Python dependencies uv.lock records.
3
+ version: 2
4
+ updates:
5
+ - package-ecosystem: github-actions
6
+ directory: /
7
+ schedule:
8
+ interval: weekly
9
+ groups:
10
+ # One pull request for the lot. Action bumps are almost always routine,
11
+ # and reviewing them together is quicker than reviewing them one by one.
12
+ actions:
13
+ patterns: ['*']
14
+
15
+ - package-ecosystem: uv
16
+ directory: /
17
+ schedule:
18
+ interval: weekly
19
+ groups:
20
+ # Dev tooling moves often and breaks nothing users see, so it travels
21
+ # together; a runtime dependency gets its own pull request.
22
+ dev:
23
+ dependency-type: development
@@ -0,0 +1,22 @@
1
+ # Categories for the notes GitHub generates from merged pull requests. The
2
+ # repository squash-merges with Conventional Commit titles, so the labels
3
+ # below are what sorts a PR into a section -- keep them on the PR, not on the
4
+ # commit.
5
+ changelog:
6
+ exclude:
7
+ labels: [skip-changelog]
8
+ categories:
9
+ - title: Breaking changes
10
+ labels: [breaking]
11
+ - title: Features
12
+ labels: [enhancement, feature]
13
+ - title: Fixes
14
+ labels: [bug, fix]
15
+ - title: Documentation
16
+ labels: [documentation]
17
+ - title: Build, CI and tooling
18
+ labels: [build, ci, tooling]
19
+ - title: Dependencies
20
+ labels: [dependencies]
21
+ - title: Other changes
22
+ labels: ['*']
@@ -0,0 +1,139 @@
1
+ name: Build binary
2
+
3
+ # Builds the standalone 'git-nested' executable for one target and uploads it
4
+ # as an artifact. Called by test.yml (so every push/PR proves the recipe still
5
+ # builds) and by release-binary.yml (which attaches it to the release) -- so
6
+ # what CI exercises is built by exactly the recipe that ships, rather than a
7
+ # lookalike that can drift away from it.
8
+ #
9
+ # One call builds one target: PyInstaller freezes for the machine it runs on
10
+ # and nothing else, so Linux, macOS and Windows binaries come from three calls
11
+ # with different 'runs-on'/'container', not from one job.
12
+ on:
13
+ workflow_call:
14
+ inputs:
15
+ ref:
16
+ description: 'Commit/tag/branch to build. Empty: whatever triggered the caller.'
17
+ type: string
18
+ required: false
19
+ default: ''
20
+ artifact:
21
+ description: 'Name of the uploaded artifact'
22
+ type: string
23
+ required: false
24
+ default: git-nested-binary
25
+ runs-on:
26
+ description: 'Runner to build on -- ubuntu-26.04, macos-latest, windows-latest'
27
+ type: string
28
+ required: false
29
+ default: ubuntu-26.04
30
+ container:
31
+ description: 'Container to build inside (Linux only). Empty: build on the runner itself.'
32
+ type: string
33
+ required: false
34
+ default: almalinux:8
35
+ python-version:
36
+ description: 'Python to freeze, e.g. 3.12'
37
+ type: string
38
+ required: false
39
+ default: '3.12'
40
+ outputs:
41
+ archive:
42
+ description: 'File name of the built archive, e.g. git-nested-1.2.3-x64-linux.tar.xz. Only meaningful for a single (non-matrix) call.'
43
+ value: ${{ jobs.build.outputs.archive }}
44
+ version:
45
+ description: 'Version of the built git-nested, e.g. 1.2.3'
46
+ value: ${{ jobs.build.outputs.version }}
47
+
48
+ jobs:
49
+ build:
50
+ runs-on: ${{ inputs.runs-on }}
51
+ # An empty string here means "no container", which is what the macOS and
52
+ # Windows callers pass -- containers are a Linux-runner feature.
53
+ #
54
+ # For Linux the default is almalinux:8, and that is a portability
55
+ # decision, not a convenience one: a PyInstaller binary links the glibc of
56
+ # the machine that built it, and glibc is only backward compatible, so
57
+ # built on ubuntu-26.04 it would refuse to start on anything older than
58
+ # that runner. AlmaLinux 8 has glibc 2.28, the oldest that still runs the
59
+ # node20 the actions below need, which covers every distro from Ubuntu
60
+ # 20.04 / Debian 10 / Fedora 29 / RHEL 8 onwards. glibc-based distros only
61
+ # -- musl ones (Alpine) can never run this binary.
62
+ container: ${{ inputs.container }}
63
+ # bash everywhere, including Windows, where the default is pwsh --
64
+ # create-python-exe.sh is one script for all three targets.
65
+ defaults:
66
+ run:
67
+ shell: bash
68
+ outputs:
69
+ archive: ${{ steps.build.outputs.archive }}
70
+ version: ${{ steps.build.outputs.version }}
71
+ steps:
72
+ # Before the checkout -- without git, actions/checkout silently falls
73
+ # back to downloading a tarball, and a checkout with no .git has no
74
+ # tags for setuptools-scm to derive the version from. Only the container
75
+ # needs this; a hosted runner ships all of it.
76
+ - name: Install build prerequisites
77
+ if: inputs.container != ''
78
+ run: dnf -y install "python${{ inputs.python-version }}" "python${{ inputs.python-version }}-pip" git tar xz
79
+
80
+ # ... and the runners get their python from here instead.
81
+ - uses: actions/setup-python@v7
82
+ if: inputs.container == ''
83
+ with:
84
+ python-version: ${{ inputs.python-version }}
85
+
86
+ - uses: actions/checkout@v7
87
+ with:
88
+ ref: ${{ inputs.ref }}
89
+ # the version frozen into the binary comes from the tags, and the
90
+ # default shallow checkout fetches none of them.
91
+ fetch-depth: 0
92
+
93
+ # the checkout is owned by a different user than this container's root,
94
+ # which git refuses to read from until told it is not a security issue.
95
+ - name: Trust the checkout
96
+ run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
97
+
98
+ - name: Build the executable
99
+ id: build
100
+ run: |
101
+ # In the container python is installed under its versioned name; on
102
+ # a runner setup-python puts a plain 'python' on PATH.
103
+ if [ -n "${{ inputs.container }}" ]; then
104
+ PY="python${{ inputs.python-version }}"
105
+ else
106
+ PY=python
107
+ fi
108
+ scripts/create-python-exe.sh --output dist --python "$PY"
109
+ # The archive name carries the version and the target
110
+ # (git-nested-<version>-<arch>-<os>.tar.xz, .zip on Windows), so it
111
+ # cannot be spelled out ahead of time -- it is published as an
112
+ # output for callers that need the exact name.
113
+ #
114
+ # nullglob: only one of the two patterns ever matches (a build
115
+ # produces .tar.xz or .zip, never both) -- without it the unmatched
116
+ # pattern is passed to ls literally, ls exits non-zero trying to
117
+ # read it, and pipefail+errexit abort the step right here with no
118
+ # visible error (ls's message went to /dev/null).
119
+ shopt -s nullglob
120
+ ARCHIVE="$(ls dist/*.tar.xz dist/*.zip 2>/dev/null | head -1)"
121
+ test -n "$ARCHIVE" || { echo "no archive produced" >&2; exit 1; }
122
+ echo "archive=$(basename "$ARCHIVE")" >> "$GITHUB_OUTPUT"
123
+ # 'git-nested Version: X.Y.Z' -> X.Y.Z
124
+ EXE=dist/git-nested
125
+ [ -f "$EXE" ] || EXE=dist/git-nested.exe
126
+ echo "version=$("$EXE" --version | head -1 | cut -d' ' -f3)" >> "$GITHUB_OUTPUT"
127
+
128
+ # the archive rather than the bare executable. It is what a release
129
+ # actually ships, and on the two platforms where it is a .tar.xz it
130
+ # keeps the exec bit as well, so consumers just untar and run it.
131
+ - uses: actions/upload-artifact@v7
132
+ with:
133
+ name: ${{ inputs.artifact }}
134
+ path: |
135
+ dist/*.tar.xz
136
+ dist/*.zip
137
+ if-no-files-found: error
138
+ # main keeps its builds for a month, branch and PR builds only for two days.
139
+ retention-days: ${{ github.ref == 'refs/heads/main' && 30 || 2 }}
@@ -0,0 +1,64 @@
1
+ name: Docs
2
+
3
+ # Builds doc/ (see doc/conf.py) with Sphinx. On pull requests it only
4
+ # builds, so a broken page fails the check. On main it also publishes the
5
+ # site to the gh_pages branch, which GitHub Pages serves.
6
+ on:
7
+ push:
8
+ branches: [main]
9
+ pull_request:
10
+ branches: ['**']
11
+ # by hand: 'Run workflow' in the Actions tab, or `gh workflow run docs.yml`
12
+ workflow_dispatch:
13
+
14
+ concurrency:
15
+ group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
16
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
17
+
18
+ jobs:
19
+ build:
20
+ runs-on: ubuntu-26.04
21
+ steps:
22
+ - name: Checkout code
23
+ uses: actions/checkout@v7
24
+ with:
25
+ # doc/conf.py shows the version from `git describe`, which needs the tags.
26
+ fetch-depth: 0
27
+ - name: Install uv
28
+ uses: astral-sh/setup-uv@v10.3.0
29
+ with:
30
+ python-version: '3.14'
31
+ enable-cache: true
32
+ - name: Setup project
33
+ run: uv sync --frozen
34
+ - name: Build docs
35
+ run: uv run poe docs
36
+ - name: Upload docs
37
+ if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
38
+ uses: actions/upload-artifact@v7
39
+ with:
40
+ name: docs-html
41
+ path: doc/_build/html
42
+ include-hidden-files: true
43
+
44
+ # A job of its own, so only this one can write to the repository.
45
+ # Only main is published, also when the workflow is started by hand.
46
+ publish:
47
+ if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
48
+ needs: build
49
+ runs-on: ubuntu-26.04
50
+ permissions:
51
+ contents: write
52
+ steps:
53
+ - name: Download docs
54
+ uses: actions/download-artifact@v8
55
+ with:
56
+ name: docs-html
57
+ path: site
58
+ - name: Publish docs
59
+ uses: peaceiris/actions-gh-pages@v4
60
+ with:
61
+ github_token: ${{ secrets.GITHUB_TOKEN }}
62
+ publish_branch: gh_pages
63
+ publish_dir: site
64
+ force_orphan: true
@@ -0,0 +1,57 @@
1
+ name: Prune artifacts
2
+
3
+ # Caps how many binary artifacts pile up against the repository's Actions
4
+ # storage quota, per artifact name and branch: main keeps its newest 3 builds,
5
+ # every other branch (PR branches included) only its newest 1. The upload
6
+ # step's retention-days (30 days main, 2 days elsewhere) is only an upper
7
+ # bound; this caps the count as well.
8
+ #
9
+ # Runs once the workflows that build the artifacts have finished, so the
10
+ # artifact of the run that triggered it already exists and the caps hold
11
+ # exactly. workflow_run only fires for workflow files on the default branch,
12
+ # so changes to this file take effect once merged.
13
+ on:
14
+ workflow_run:
15
+ workflows:
16
+ - Run Tests
17
+ - Release binary
18
+ types:
19
+ - completed
20
+ # on-demand -- 'Run workflow' in the Actions tab, or `gh workflow run prune-artifacts.yml`
21
+ workflow_dispatch:
22
+ inputs:
23
+ keep:
24
+ description: 'How many of the newest main artifacts to keep per artifact name (other branches keep 1)'
25
+ type: number
26
+ default: 3
27
+
28
+ permissions:
29
+ actions: write
30
+
31
+ # two prunes at once would only race each other deleting the same artifacts.
32
+ concurrency:
33
+ group: ${{ github.workflow }}
34
+ cancel-in-progress: false
35
+
36
+ jobs:
37
+ prune:
38
+ runs-on: ubuntu-26.04
39
+ steps:
40
+ - name: Delete all but the newest builds
41
+ env:
42
+ GH_TOKEN: ${{ github.token }}
43
+ REPO: ${{ github.repository }}
44
+ KEEP: ${{ inputs.keep || 3 }}
45
+ run: |
46
+ # Per artifact name and branch ("git-nested-binary-ci-linux" on
47
+ # "main", ...), newest first; everything after the first $KEEP on
48
+ # main, or after the first 1 on any other branch, is deleted. Other
49
+ # artifacts (dist) are not touched.
50
+ gh api --paginate "repos/$REPO/actions/artifacts?per_page=100" \
51
+ --jq '.artifacts[] | select(.expired == false) | select(.name | startswith("git-nested-binary-")) | [.name + " " + .workflow_run.head_branch, .created_at, .id, .workflow_run.head_branch] | @tsv' \
52
+ | sort -t $'\t' -k1,1 -k2,2r \
53
+ | awk -F'\t' -v keep="$KEEP" '{ if (++n[$1] > ($4 == "main" ? keep : 1)) print $3, $1 }' \
54
+ | while read -r id name; do
55
+ echo "delete $name (artifact $id)"
56
+ gh api -X DELETE "repos/$REPO/actions/artifacts/$id"
57
+ done
@@ -6,14 +6,14 @@ on:
6
6
 
7
7
  jobs:
8
8
  build:
9
- runs-on: ubuntu-latest
9
+ runs-on: ubuntu-26.04
10
10
  steps:
11
11
  - name: Checkout code
12
- uses: actions/checkout@v4
12
+ uses: actions/checkout@v7
13
13
  with:
14
14
  fetch-depth: 0
15
15
  - name: Install uv
16
- uses: astral-sh/setup-uv@v7
16
+ uses: astral-sh/setup-uv@v10.3.0
17
17
  with:
18
18
  python-version: '3.13'
19
19
  enable-cache: true
@@ -22,14 +22,14 @@ jobs:
22
22
  - name: Build package
23
23
  run: uv run poe build
24
24
  - name: Upload dist
25
- uses: actions/upload-artifact@v4
25
+ uses: actions/upload-artifact@v7
26
26
  with:
27
27
  name: dist
28
28
  path: dist/
29
29
 
30
30
  publish:
31
31
  needs: build
32
- runs-on: ubuntu-latest
32
+ runs-on: ubuntu-26.04
33
33
  environment:
34
34
  name: pypi
35
35
  url: https://pypi.org/project/git-nested/
@@ -37,7 +37,7 @@ jobs:
37
37
  id-token: write
38
38
  steps:
39
39
  - name: Download dist
40
- uses: actions/download-artifact@v4
40
+ uses: actions/download-artifact@v8
41
41
  with:
42
42
  name: dist
43
43
  path: dist/
@@ -1,9 +1,9 @@
1
1
  name: Release binary
2
2
 
3
- # Builds the single-file 'git-nested' executable (see
4
- # scripts/create-python-exe.sh) and attaches
5
- # git-nested-<version>-x64-linux.tar.xz to the release, so git-nested can be
6
- # used on a machine that has no python -- and no pip, no uv -- at all.
3
+ # Builds the single-file 'git-nested' executable for Linux, macOS and Windows
4
+ # (see scripts/create-python-exe.sh) and attaches each archive to the release,
5
+ # so git-nested can be used on a machine that has no python -- and no pip, no
6
+ # uv -- at all.
7
7
  #
8
8
  # Separate from publish.yml on purpose. That one is triggered by the tag push
9
9
  # and uploads to PyPI, while attaching an asset needs the GitHub *release* to
@@ -40,10 +40,27 @@ jobs:
40
40
  # test.yml so both exercise the same executable. 'env.REF' is not available
41
41
  # to a reusable workflow's inputs, so the ref is spelled out again.
42
42
  build:
43
+ strategy:
44
+ fail-fast: false
45
+ matrix:
46
+ include:
47
+ # Intel macOS is deliberately absent: those runners are gone, and
48
+ # the arm64 binary is what a current Mac needs.
49
+ - target: linux
50
+ runs-on: ubuntu-26.04
51
+ container: almalinux:8
52
+ - target: macos
53
+ runs-on: macos-latest
54
+ container: ''
55
+ - target: windows
56
+ runs-on: windows-latest
57
+ container: ''
43
58
  uses: ./.github/workflows/build-binary.yml
44
59
  with:
45
60
  ref: ${{ github.event.release.tag_name || inputs.tag || github.ref }}
46
- artifact: git-nested-binary
61
+ artifact: git-nested-binary-${{ matrix.target }}
62
+ runs-on: ${{ matrix.runs-on }}
63
+ container: ${{ matrix.container }}
47
64
 
48
65
  # The whole pytest suite, driven through the binary that is about to be
49
66
  # attached -- the check that it is functionally complete, not just startable.
@@ -52,14 +69,14 @@ jobs:
52
69
  uses: ./.github/workflows/test-binary.yml
53
70
  with:
54
71
  ref: ${{ github.event.release.tag_name || inputs.tag || github.ref }}
55
- artifact: git-nested-binary
72
+ artifact: git-nested-binary-linux
56
73
 
57
74
  # Proves the "runs on any x86_64 Linux" claim rather than assuming it. The
58
75
  # binary is dropped into stock distro images that have no python installed,
59
76
  # and has to drive a real nested repo end to end there.
60
77
  verify:
61
78
  needs: build
62
- runs-on: ubuntu-latest
79
+ runs-on: ubuntu-26.04
63
80
  strategy:
64
81
  fail-fast: false
65
82
  matrix:
@@ -81,14 +98,14 @@ jobs:
81
98
  - image: archlinux:latest
82
99
  install: pacman -Sy --noconfirm git
83
100
  steps:
84
- - uses: actions/download-artifact@v4
101
+ - uses: actions/download-artifact@v8
85
102
  with:
86
- name: git-nested-binary
103
+ name: git-nested-binary-linux
87
104
 
88
- # Named git-nested-<version>-x64-linux.tar.xz -- resolved by glob since
89
- # the version isn't known here.
105
+ # Named git-nested-<version>-<arch>-linux.tar.xz -- resolved by glob
106
+ # since the version isn't known here.
90
107
  - name: Unpack
91
- run: tar -xf git-nested-*-x64-linux.tar.xz
108
+ run: tar -xf git-nested-*-linux.tar.xz
92
109
 
93
110
  # git is the one thing that does have to be installed -- git-nested
94
111
  # drives it and refuses to start without it. Python deliberately is not:
@@ -146,21 +163,26 @@ jobs:
146
163
  needs: [build, test, verify]
147
164
  # nothing to attach when workflow_dispatch ran without a tag
148
165
  if: github.event_name == 'release' || inputs.tag != ''
149
- runs-on: ubuntu-latest
166
+ runs-on: ubuntu-26.04
150
167
  permissions:
151
168
  contents: write
152
169
  steps:
153
- - uses: actions/download-artifact@v4
170
+ # every target's artifact, unpacked side by side. 'build' is a matrix,
171
+ # and a matrix job's outputs are last-one-wins, so the exact file names
172
+ # are read off disk here rather than composed from an output.
173
+ - uses: actions/download-artifact@v8
154
174
  with:
155
- name: git-nested-binary
175
+ pattern: git-nested-binary-*
176
+ merge-multiple: true
156
177
 
157
178
  # --clobber so re-running against an already-attached release replaces
158
- # the asset instead of failing halfway. The filename is composed from
159
- # 'build's version output -- this is the point that actually names the
160
- # release asset, so it uses the real version rather than a glob.
161
- - name: Attach git-nested-${{ needs.build.outputs.version }}-x64-linux.tar.xz to ${{ env.REF }}
179
+ # the assets instead of failing halfway.
180
+ - name: Attach the binaries to ${{ env.REF }}
162
181
  env:
163
182
  GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
164
183
  GH_REPO: ${{ github.repository }}
165
- ARCHIVE: git-nested-${{ needs.build.outputs.version }}-x64-linux.tar.xz
166
- run: gh release upload "$REF" "$ARCHIVE" --clobber
184
+ run: |
185
+ mapfile -t assets < <(ls git-nested-*.tar.xz git-nested-*.zip 2>/dev/null)
186
+ test "${#assets[@]}" -gt 0 || { echo "no archives downloaded" >&2; exit 1; }
187
+ printf '%s\n' "${assets[@]}"
188
+ gh release upload "$REF" "${assets[@]}" --clobber
@@ -1,7 +1,7 @@
1
1
  name: Test binary
2
2
 
3
- # Runs the *whole* pytest suite against the standalone executable instead of
4
- # against the git_nested module in the checkout: conftest's GIT_NESTED_EXE
3
+ # Runs the *whole* pytest suite against the standalone Linux executable rather
4
+ # than against the git_nested module in the checkout: conftest's GIT_NESTED_EXE
5
5
  # routes every cmd_git_nested() call through `git nested ...` on PATH, so the
6
6
  # ~130 tests drive the frozen binary as a user would. That is what catches the
7
7
  # failures unique to freezing -- a module PyInstaller did not collect, package
@@ -28,9 +28,9 @@ on:
28
28
 
29
29
  jobs:
30
30
  test:
31
- runs-on: ubuntu-latest
31
+ runs-on: ubuntu-26.04
32
32
  steps:
33
- - uses: actions/checkout@v4
33
+ - uses: actions/checkout@v7
34
34
  with:
35
35
  ref: ${{ inputs.ref }}
36
36
  # no fetch-depth: 0 needed -- the version under test is read out of
@@ -38,7 +38,7 @@ jobs:
38
38
  # tags of this checkout.
39
39
 
40
40
  - name: Install uv
41
- uses: astral-sh/setup-uv@v7
41
+ uses: astral-sh/setup-uv@v10.3.0
42
42
  with:
43
43
  python-version: '3.13'
44
44
  enable-cache: true
@@ -56,19 +56,19 @@ jobs:
56
56
  git config --global --add safe.directory "$PWD";
57
57
  git config --global --add safe.directory "$PWD.git";
58
58
 
59
- - uses: actions/download-artifact@v4
59
+ - uses: actions/download-artifact@v8
60
60
  with:
61
61
  name: ${{ inputs.artifact }}
62
62
 
63
63
  # into its own directory: the env fixture puts the binary's directory on
64
64
  # PATH, and the repo root is not a good thing to put there. Named
65
- # git-nested-<version>-x64-linux.tar.xz, so matched by glob. 'git-nested'
65
+ # git-nested-<version>-<arch>-linux.tar.xz, so matched by glob. 'git-nested'
66
66
  # inside is a symlink to the versioned binary, so both land in bin/
67
67
  # together.
68
68
  - name: Unpack the binary
69
69
  run: |
70
70
  mkdir -p bin
71
- tar -C bin -xf git-nested-*-x64-linux.tar.xz
71
+ tar -C bin -xf git-nested-*-linux.tar.xz
72
72
  bin/git-nested --version
73
73
 
74
74
  # no coverage flags: the code being executed lives in another process