RFC: Adding an option to log-like commands to call an external command for each revision

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have this alias in my .gitconfig:

    review = "!f() { for rev in $(git rev-list --reverse \"$@\"); do
git show $rev; done; }; f"

I use it after I "git pull" to see what changed, e.g.:

    git review 49ea7b8..e1ef3c1

But sometimes I find that I want to do that for other things too, so I
have these hacks:

    review-grep = "!f() { for rev in $(git log --reverse
--pretty=format:%H --grep=\"$@\"); do git show $rev; done; }; f"
    review-file = "!f() { for rev in $(git log --reverse
--pretty=format:%H \"$@\"); do git show $rev; done; }; f"

But just now I wanted to use -S instead of grep, but adding aliases
like this is a bit silly.

Maybe we should have something like:

    git log --for-each=less a..b

To call "less" for each commit, what do you think?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]