Add -a, --commit-all to commit every modified tracked file with the bump

Open Beginner friendly
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
86/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
cli

Research direction

Start in crates/bumpversion/src/vcs/git.rs beside the existing add operation, then trace how commit options are declared and mapped to environment variables and config keys. Implement --commit-all/--no-commit-all and verify the behavior stages tracked changes after pre-commit hooks while leaving untracked files out; confirm --commit-all also permits a dirty tree.

Written by the indexing model from the issue text.

Description

enhancement

A release often edits files the bump doesn't touch, such as CHANGELOG.md, the README or an agent file, and wants them in the bump commit. Today that takes --allow-dirty --commit-args=-a, or listing each file in additional_files.

Add -a, --commit-all: the bump commit takes every modified tracked file, like git commit --all. Untracked files stay out; git add one first to include it.

  • --commit-all implies --allow-dirty, since a dirty tree is the only reason to use it.
  • It has the same shape as the other options: --commit-all / --no-commit-all, BUMPVERSION_COMMIT_ALL, and a commit_all config key.
  • Staging runs after the pre-commit hooks, so what they change is committed too. git add --update without a file list stages every tracked change, next to the existing add in crates/bumpversion/src/vcs/git.rs.

Usage: bumpversion minor -a.

Dominant language
Rust
Stars
1
Forks
0
Avg merge
12m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from romnn/bumpversion

All issues in romnn/bumpversion

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.