Re: RFC: Adding an option to log-like commands to call an external command for each revision
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Sep 11, 2010, 19:07 UTC
- Message-ID
- <AANLkTi=p1ScGXAWprSYC6=K_FyNS3m2En-NZLtNU_ES_@mail.gmail.com>
- In-Reply-To
- <AANLkTi=WokEQMDc92SoWXPJW67dy0q79WW9RajrBHRx3@mail.gmail.com>
On Sat, Sep 11, 2010 at 15:56, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> `On Mon, Aug 30, 2010 at 03:08, Jeff King <peff@peff.net> wrote:
Show 17 quoted lines
>> I don't understand why you have these at all. Just use "git log
>> --format=%H" in your git review above (instead of rev-list), and then
>> you can just do:
>>
>> git review --grep=whatever
>> git review -Sfoo
>> git review file
>>
>> Or am I missing something subtle?
>
> You're not missing something, my alias was silly because I brainfarted
> and didn't realize I could do $@, not "$@", so now it's:
>
> review = "!f() { for rev in $(git log --reverse --format=%H $@);
> do git show $rev; done; }; f"
>
> Which means I can do all of the commands you suggested above, thanks!Hrm, actually in the case of that alias doing:
git review -M ...
Won't do what I want, because it's `git show` that has to be invoked by -M. An option like --for-each-invoke-pager (or something) could do the right thing there.