git-plan icon indicating copy to clipboard operation
git-plan copied to clipboard

feat: a `stage` command which stages hunks to a specific plan automatically

Open rorybyrne opened this issue 3 years ago • 1 comments

It would be nice if git-plan could automatically associate each hunk with an existing plan, so that coders don't need to stage their changes into commits manually.

rorybyrne avatar Mar 07 '21 20:03 rorybyrne

I think the easiest way to achieve this, as a first attempt, is to parse annotated comments in code. For example:

# git-plan: GP-131
def some_func():
    call_stuff()
    ...

When you run git plan stage --plan GP-131, we should parse the files and stage the above hunk because it reference the plan with id GP-131.

rorybyrne avatar Mar 28 '21 18:03 rorybyrne