git-hunk 0.4.0__tar.gz → 0.4.1__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.
- {git_hunk-0.4.0 → git_hunk-0.4.1}/PKG-INFO +9 -5
- {git_hunk-0.4.0 → git_hunk-0.4.1}/README.md +8 -4
- {git_hunk-0.4.0 → git_hunk-0.4.1}/git_hunk/_cli.py +9 -3
- {git_hunk-0.4.0 → git_hunk-0.4.1}/git_hunk/_git.py +2 -0
- {git_hunk-0.4.0 → git_hunk-0.4.1}/git_hunk/_ui.py +1 -1
- {git_hunk-0.4.0 → git_hunk-0.4.1}/git_hunk/skills/core/SKILL.md +2 -1
- {git_hunk-0.4.0 → git_hunk-0.4.1}/pyproject.toml +1 -1
- {git_hunk-0.4.0 → git_hunk-0.4.1}/.gitignore +0 -0
- {git_hunk-0.4.0 → git_hunk-0.4.1}/LICENSE +0 -0
- {git_hunk-0.4.0 → git_hunk-0.4.1}/git_hunk/__init__.py +0 -0
- {git_hunk-0.4.0 → git_hunk-0.4.1}/git_hunk/__main__.py +0 -0
- {git_hunk-0.4.0 → git_hunk-0.4.1}/git_hunk/_hunk.py +0 -0
- {git_hunk-0.4.0 → git_hunk-0.4.1}/git_hunk/_lines.py +0 -0
- {git_hunk-0.4.0 → git_hunk-0.4.1}/git_hunk/_patch.py +0 -0
- {git_hunk-0.4.0 → git_hunk-0.4.1}/git_hunk/_skills.py +0 -0
- {git_hunk-0.4.0 → git_hunk-0.4.1}/git_hunk/skills/logical-commits/SKILL.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: git-hunk
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Non-interactive, programmatic git hunk staging with durable Hunk IDs.
|
|
5
5
|
Project-URL: Homepage, https://github.com/wkentaro/git-hunk
|
|
6
6
|
Project-URL: Issues, https://github.com/wkentaro/git-hunk/issues
|
|
@@ -71,7 +71,7 @@ variant: organize a dirty working tree into correct, focused commits, once
|
|
|
71
71
|
following git-hunk's bundled skills and once restricted to bare Git. The
|
|
72
72
|
[checked-in eval harness](https://github.com/wkentaro/git-hunk/tree/0ef14bef657e187b5ab7283b0dbd64751a02736f/eval)
|
|
73
73
|
grades the exact resulting repository state — commit partition and order, final
|
|
74
|
-
tree, index, and leftovers. This table records the qualifying run; `
|
|
74
|
+
tree, index, and leftovers. This table records the qualifying run; `just eval`
|
|
75
75
|
reruns the protocol and prints a table in the same format.
|
|
76
76
|
|
|
77
77
|
| Task | git-hunk | bare Git |
|
|
@@ -370,12 +370,16 @@ content and creates new IDs.
|
|
|
370
370
|
Bug reports, feature requests, and pull requests are welcome on
|
|
371
371
|
[GitHub](https://github.com/wkentaro/git-hunk).
|
|
372
372
|
|
|
373
|
+
Install [just](https://just.systems/man/en/packages.html) 1.58.0 or newer and
|
|
374
|
+
[uv](https://docs.astral.sh/uv/getting-started/installation/). Recipes use Bash;
|
|
375
|
+
on Windows, install Git for Windows and make its Bash available on `PATH`.
|
|
376
|
+
|
|
373
377
|
```bash
|
|
374
378
|
git clone https://github.com/wkentaro/git-hunk.git
|
|
375
379
|
cd git-hunk
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
380
|
+
just setup # install dependencies
|
|
381
|
+
just test # run tests
|
|
382
|
+
just lint # run linters
|
|
379
383
|
```
|
|
380
384
|
|
|
381
385
|
## License
|
|
@@ -43,7 +43,7 @@ variant: organize a dirty working tree into correct, focused commits, once
|
|
|
43
43
|
following git-hunk's bundled skills and once restricted to bare Git. The
|
|
44
44
|
[checked-in eval harness](https://github.com/wkentaro/git-hunk/tree/0ef14bef657e187b5ab7283b0dbd64751a02736f/eval)
|
|
45
45
|
grades the exact resulting repository state — commit partition and order, final
|
|
46
|
-
tree, index, and leftovers. This table records the qualifying run; `
|
|
46
|
+
tree, index, and leftovers. This table records the qualifying run; `just eval`
|
|
47
47
|
reruns the protocol and prints a table in the same format.
|
|
48
48
|
|
|
49
49
|
| Task | git-hunk | bare Git |
|
|
@@ -342,12 +342,16 @@ content and creates new IDs.
|
|
|
342
342
|
Bug reports, feature requests, and pull requests are welcome on
|
|
343
343
|
[GitHub](https://github.com/wkentaro/git-hunk).
|
|
344
344
|
|
|
345
|
+
Install [just](https://just.systems/man/en/packages.html) 1.58.0 or newer and
|
|
346
|
+
[uv](https://docs.astral.sh/uv/getting-started/installation/). Recipes use Bash;
|
|
347
|
+
on Windows, install Git for Windows and make its Bash available on `PATH`.
|
|
348
|
+
|
|
345
349
|
```bash
|
|
346
350
|
git clone https://github.com/wkentaro/git-hunk.git
|
|
347
351
|
cd git-hunk
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
352
|
+
just setup # install dependencies
|
|
353
|
+
just test # run tests
|
|
354
|
+
just lint # run linters
|
|
351
355
|
```
|
|
352
356
|
|
|
353
357
|
## License
|
|
@@ -69,6 +69,9 @@ JSON_SCHEMA_VERSION: Final = 2
|
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
class CliError(Exception):
|
|
72
|
+
tip: str | None
|
|
73
|
+
usage: str | None
|
|
74
|
+
|
|
72
75
|
def __init__(
|
|
73
76
|
self,
|
|
74
77
|
message: str,
|
|
@@ -868,7 +871,7 @@ def cmd_discard(
|
|
|
868
871
|
|
|
869
872
|
|
|
870
873
|
@cli.command("commit", add_help_option=False)
|
|
871
|
-
@click.option("-m", "
|
|
874
|
+
@click.option("-m", "messages", multiple=True)
|
|
872
875
|
@click.option("-l", "line_spec", default=None)
|
|
873
876
|
@click.option("--include-matching", "include_matching", multiple=True)
|
|
874
877
|
@click.option("--exclude-matching", "exclude_matching", multiple=True)
|
|
@@ -879,7 +882,7 @@ def cmd_discard(
|
|
|
879
882
|
def cmd_commit(
|
|
880
883
|
*,
|
|
881
884
|
targets: tuple[str, ...],
|
|
882
|
-
|
|
885
|
+
messages: tuple[str, ...],
|
|
883
886
|
line_spec: str | None,
|
|
884
887
|
include_matching: tuple[str, ...],
|
|
885
888
|
exclude_matching: tuple[str, ...],
|
|
@@ -890,7 +893,10 @@ def cmd_commit(
|
|
|
890
893
|
if show_help:
|
|
891
894
|
print_help(HELP_COMMIT)
|
|
892
895
|
return
|
|
893
|
-
|
|
896
|
+
# Each -m is its own paragraph, as in git commit; git's own cleanup then
|
|
897
|
+
# collapses blank ones.
|
|
898
|
+
message = "\n\n".join(messages)
|
|
899
|
+
if not message.strip():
|
|
894
900
|
raise CliError("commit requires a message (-m)", usage=USAGE_COMMIT)
|
|
895
901
|
|
|
896
902
|
worktree_root, invocation_prefix = _require_worktree_context()
|
|
@@ -438,7 +438,7 @@ can retry with [bold cyan]git commit[/bold cyan].
|
|
|
438
438
|
{USAGE_COMMIT}
|
|
439
439
|
|
|
440
440
|
[bold green]Options:[/bold green]
|
|
441
|
-
[bold cyan]-m[/bold cyan] [cyan]<msg>[/cyan] Commit message (required)
|
|
441
|
+
[bold cyan]-m[/bold cyan] [cyan]<msg>[/cyan] Commit message (required; repeat for more paragraphs)
|
|
442
442
|
{_LINE_OPT_ROW}
|
|
443
443
|
|
|
444
444
|
{_format_examples(rows=_EXAMPLES_COMMIT)}""" # noqa: E501
|
|
@@ -30,7 +30,8 @@ git-hunk list
|
|
|
30
30
|
`git-hunk commit <id-or-path>... -m <message>` stages exactly those hunks and
|
|
31
31
|
commits them; it aborts when the index already holds staged changes. A
|
|
32
32
|
Repository path selects every changed hunk in one exact file and beats an ID
|
|
33
|
-
when committing a whole file.
|
|
33
|
+
when committing a whole file. Repeat `-m` as with `git commit`: each one
|
|
34
|
+
becomes its own paragraph.
|
|
34
35
|
|
|
35
36
|
Committing a complete hunk leaves every other non-`conditional` ID valid, so a
|
|
36
37
|
whole plan of complete hunks chains in one call.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|