All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: Adding an option to log-like commands to call an external command for each revision
@ 2010-08-29 20:30 Ævar Arnfjörð Bjarmason
  2010-08-29 20:39 ` Jonathan Nieder
  2010-08-30  3:08 ` Jeff King
  0 siblings, 2 replies; 9+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-08-29 20:30 UTC (permalink / raw)
  To: Git Mailing List

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?

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-09-12 22:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-29 20:30 RFC: Adding an option to log-like commands to call an external command for each revision Ævar Arnfjörð Bjarmason
2010-08-29 20:39 ` Jonathan Nieder
2010-08-30  3:08 ` Jeff King
2010-09-11 15:56   ` Ævar Arnfjörð Bjarmason
2010-09-11 17:09     ` Mark Lodato
2010-09-11 19:07     ` Ævar Arnfjörð Bjarmason
2010-09-11 22:17     ` Artur Skawina
2010-09-12 21:25     ` Junio C Hamano
2010-09-12 22:44       ` Ævar Arnfjörð Bjarmason

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.