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

Allow arbitrary command to generate commits for git-icing

Open HarveyHunt opened this issue 10 years ago • 3 comments

I am using a script to generate commit hashes for git cherry-menu to use as such:

git cherry-menu ./my-script.sh

It'd be nice if I could use the same script as input to git-icing

HarveyHunt avatar Oct 09 '15 14:10 HarveyHunt

Yeah that's a good idea. Currently use of git cherry is hardcoded into git-icing:

IO.popen(["git", "cherry", "-v"] + ARGV) do |out|

but it would be easy to change this. The only challenge is deciding the appropriate CLI syntax. I guess it could be changed to the same wrapper approach git cherry-menu uses, i.e.

git icing [icing options] COMMAND ARGS

where COMMAND ARGS is typically git cherry -v, although it means the most common usage invocation is a bit ugly:

git icing -v3 git cherry -v

aspiers avatar Oct 09 '15 14:10 aspiers

Thanks for the quick response. :-)

Would it not be possible to detect if no COMMAND ARGS sequence has been passed and just default to git cherry -v?

That potential common usage invocation matches git cherry-menu, so perhaps the user might expect that behaviour?

HarveyHunt avatar Oct 09 '15 15:10 HarveyHunt

Thanks for the quick response. :-)

Sorry for the slow response this time :-(

Yeah that sounds like it could work - pull requests very welcome ;-)

aspiers avatar Feb 28 '16 13:02 aspiers