Skip to content

[feature request]: run command on each (applied) patch #469

@fbenkstein

Description

@fbenkstein

Hi,

I switched from a git rebase --interactive based workflow to stgit and it's working great. One thing I'm missing occasionally is git rebase --exec '...' which allows me to run a command on each patch, e.g. to check if build and tests are still working after reshuffling patches or rebasing.

I came up with an alias which provides a crude immitation of the feature but having something built-in would be quite useful:

[stgit "alias"]
  foreach = "!bash -c 'for ((i=0, n=$(stg series -cA); i < n; i++)); do stg goto $i || break; ( set -xe; \"$@\" ) || { ret=$?; echo "Exit code $ret" >&2; exit $ret; }; done'" --

I'd be willing to try implementing this myself if such a patch has a chance of being accepted.

Thank you,
Frank.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions