bartman's blog

starting on git-find

bartman

So I am giving myself some time to write a git-find script that I can use to feed commits to another tool, like git-graft (or git-cherry-pick).

I don’t really know what I am doing yet, so I want to survey what is available in git-* tools and reuse as much of the available features.

git-find needs to:

… interestingly enough this is almost what can already be done with git-rev-list. git-find should then use git-rev-list to locate the initial set of commits to work on.

I think that’s it. Looks like all the pieces are there. The hardest part, for this bash weenie, will be to represent the conditions in bash.

Why am I not doing this in perl, again?

Anyway, on with the show…

… the rest is really just shell magic.

** … few hours go by … **

So here is the the first implementation git-find.git.

I had to add glob support to git-diff, which took a while to figure out. ;)

Tags: