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

Re: Reacting to new commits in a poll-mirror

From
MKmartin f krafft <madduck@madduck.net>
Date
Feb 3, 2010, 10:48 UTC
Message-ID
<20100203104857.GC20450@lapse.rw.madduck.net>
In-Reply-To
<7vzl3rt88c.fsf@alter.siamese.dyndns.org>
also sprach Junio C Hamano <gitster@pobox.com> [2010.02.03.1432 +1300]:
Show 11 quoted lines
> So I don't see what you find wrong about writing your script like:
> 
>     #!/bin/sh
>     before_fetch=$(git for-each-ref --format='%(objectname)') &&
>     git fetch || exit
> 
>     git rev-list --all --not $before_fetch |
>     while read rev
>     do
> 	do your patchwork magic...
>     done

This sounds pretty much what I had in mind, and you have convinced me that this is the right/better approach. Thanks for keeping those feet on the ground!

-- 
martin | http://madduck.net/ | http://two.sentenc.es/
 
half a bee, philosophically, must ipso facto half not be.
but half the bee has got to be, vis-a-vis its entity. you see?
but can a bee be said to be or not to be an entire bee,
when half the bee is not a bee, due to some ancient injury?
                                                       -- monty python
 
spamtraps: madduck.bogus@madduck.net
Previous: Junio C Hamano
Message 4 of 4 in “Reacting to new commits in a poll-mirror”
  1. martin f krafftFeb 2, 2010
  2. martin f krafftFeb 3, 2010
  3. Junio C HamanoFeb 3, 2010
  4. martin f krafftFeb 3, 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.