Re: multiple-commit cherry-pick?
- From
- Chris Frey <cdfrey@foursquare.net>
- Date
- Nov 14, 2008, 05:08 UTC
- Message-ID
- <20081114050822.GA23963@foursquare.net>
- In-Reply-To
- <alpine.DEB.1.00.0811102230330.30769@pacific.mpi-cbg.de>
On Mon, Nov 10, 2008 at 10:31:32PM +0100, Johannes Schindelin wrote:
Show 17 quoted lines
> On Mon, 10 Nov 2008, Alex Riesen wrote: > > for cs in HEAD^..HEAD HEAD~10; do > > case "$cs"; in > > *..*) > > git format-patch --stdout "$cs" > > ;; > > *) > > git show --pretty=email "$cs" > > ;; > > esac > > done > > > > At least, this is what I have in mind and how I expect it to work. > > That is not the way git-show is implemented (it uses setup_revisions() to > check for validity and to parse the arguments), and I cannot think of any > way to make this work without ugly workarounds.
Would it be possible to add "range" support to a subset of commands by using a git-range wrapper?
Hypothetical, pie-in-the-sky idea:
git range HEAD^..HEAD HEAD~10 -- show --pretty=email git range HEAD^..HEAD HEAD~10 -- log git range HEAD^..HEAD HEAD~10 -- cherry-pick
Which would call the given command for each of the commits found in all the specified ranges and lists. git-range could have an internal list of supported git subcommands that it would massage the parameter lists for.
I find this both elegant and ugly at the same time. :-)
- Chris