You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 "Exitcode$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.
The text was updated successfully, but these errors were encountered:
I'm not categorically opposed to StGit having this kind of feature. But I do want to be careful about only adding features that are generally useful and have a good risk-to-value proposition.
Would you want a stg foreach command that behaves as your alias does?
Or are you imagining some StGit commands gaining a --exec option?
What's the scope?
I'll also note that if we implemented #241, then it would be possible to write a stg-foreach script that lived in $PATH that could be run as stg foreach. It would be an easy call to add such a script to the contrib directory.
Hi,
I switched from a
git rebase --interactive
based workflow to stgit and it's working great. One thing I'm missing occasionally isgit 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:
I'd be willing to try implementing this myself if such a patch has a chance of being accepted.
Thank you,
Frank.
The text was updated successfully, but these errors were encountered: