Nathan Collins wrote:
> On Wed, Apr 30, 2014 at 7:40 PM, Jonathan Nieder <> wrote:
>> Nathan Collins wrote:

>>> git show | git apply --reverse
>> The following which only uses plumbing commands should work:
>>         git diff-tree -p HEAD^! |
>>         git apply --reverse
> Nice! However, I don't now how to generalize this solution to other
> (probably insane) use cases, e.g.
>   git log -S<string> --patch | git apply --reverse

This should do it:

        git rev-list HEAD |
        git diff-tree --no-commit-id -p -S<string> --stdin |
        git apply --reverse

More generally, when scripting plumbing commands tend to do the right

Will think more about the documentation and other parts (or if someone
else sends a patch before I can, I won't mind).

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to