git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Mark LodatoNext: Artur Skawina
Message 6 of 9 in “RFC: Adding an option to log-like commands to call an external command for each revision”
  1. Ævar Arnfjörð BjarmasonAug 29, 2010
  2. Jonathan NiederAug 29, 2010
  3. Jeff KingAug 30, 2010
  4. Ævar Arnfjörð BjarmasonSep 11, 2010
  5. Mark LodatoSep 11, 2010
  6. Ævar Arnfjörð BjarmasonSep 11, 2010
  7. Artur SkawinaSep 11, 2010
  8. Junio C HamanoSep 12, 2010
  9. Ævar Arnfjörð BjarmasonSep 12, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.