I am using Git cherry and would like to see more detail about the commits it finds. First I run
git cherry
-- read the output
git show sha-1
Is there a way to see the commit/log/diffs for all the results of cherry, and page through them? I've tried piping the results of git cherry to various thi开发者_开发问答ngs but cant seem to find one that works.
I do not have a "complete" answer, but these quick hacks may be helpful:
$ git cherry master
+ c3f6a19ac55170baa33fbbfb583ff3f0d4ad2710
+ 8b73d6cb31d0a3fed328acd31d524a671238f51a
$ git cherry -v master
+ c3f6a19ac55170baa33fbbfb583ff3f0d4ad2710 Add "foo" command
+ 8b73d6cb31d0a3fed328acd31d524a671238f51a Add "--bar" argument
$ git cherry master | awk '{ system("git show $2"); }'
[ interactive "git show" calls happen here ]
$
Remaining issues are
- You do not see whether the "git show"n thing is actually prefixed with a
+
. - You have no way from within the "git show" to abort the whole operation.
- You have no way from within the "git show" to know whether the shown commit is 1/100, 1/2, or 88/100.
精彩评论