* Hook after pull ? @ 2007-07-11 14:41 Claudio Scordino 2007-07-11 14:51 ` Alex Riesen 0 siblings, 1 reply; 5+ messages in thread From: Claudio Scordino @ 2007-07-11 14:41 UTC (permalink / raw) To: git; +Cc: Johannes.Schindelin Hi all. Does any hook being called after the pull (that means, after fetch or merge) ? If no, does exist any easy way of creating such hook ? Many thanks in advance, Claudio ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Hook after pull ? 2007-07-11 14:41 Hook after pull ? Claudio Scordino @ 2007-07-11 14:51 ` Alex Riesen 2007-07-11 15:29 ` Claudio Scordino 0 siblings, 1 reply; 5+ messages in thread From: Alex Riesen @ 2007-07-11 14:51 UTC (permalink / raw) To: Claudio Scordino; +Cc: git, Johannes.Schindelin On 7/11/07, Claudio Scordino <cloud.of.andor@gmail.com> wrote: > Hi all. > > Does any hook being called after the pull (that means, after fetch or merge) ? > There are some > If no, does exist any easy way of creating such hook ? > What for? What do you want to do? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Hook after pull ? 2007-07-11 14:51 ` Alex Riesen @ 2007-07-11 15:29 ` Claudio Scordino 2007-07-11 18:33 ` Alex Riesen 0 siblings, 1 reply; 5+ messages in thread From: Claudio Scordino @ 2007-07-11 15:29 UTC (permalink / raw) To: Alex Riesen; +Cc: git, Johannes.Schindelin Alex Riesen wrote: > On 7/11/07, Claudio Scordino <cloud.of.andor@gmail.com> wrote: >> Hi all. >> >> Does any hook being called after the pull (that means, after fetch or >> merge) ? >> > > There are some Which one of those inside the .git/hooks directory is called afret a pull? > >> If no, does exist any easy way of creating such hook ? >> > > What for? What do you want to do? > I just need my script to be called after a pull. My script just sends an email saying that the repository has been pulled (I already did it for the push). Thanks, Claudio ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Hook after pull ? 2007-07-11 15:29 ` Claudio Scordino @ 2007-07-11 18:33 ` Alex Riesen 2007-07-11 21:26 ` Junio C Hamano 0 siblings, 1 reply; 5+ messages in thread From: Alex Riesen @ 2007-07-11 18:33 UTC (permalink / raw) To: Claudio Scordino; +Cc: git, Johannes.Schindelin Claudio Scordino, Wed, Jul 11, 2007 17:29:19 +0200: > >>If no, does exist any easy way of creating such hook ? > > > >What for? What do you want to do? > > > I just need my script to be called after a pull. My script just sends an > email saying that the repository has been pulled (I already did it for the > push). Ach, on _remote_ repo. Where it is _pulled_from_. There are none. You can catch log output of git-daemon, but... Isn't it a bit extreme? A fetch (part of a pull) is *very* common operation, sometime you'll get a *real* lot of mail. P.S. BTW, there is no hooks for pull in local (where it is pulled into): it is not needed, you already control everything what happens. But it is not your situation, as far I understand. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Hook after pull ? 2007-07-11 18:33 ` Alex Riesen @ 2007-07-11 21:26 ` Junio C Hamano 0 siblings, 0 replies; 5+ messages in thread From: Junio C Hamano @ 2007-07-11 21:26 UTC (permalink / raw) To: Alex Riesen; +Cc: Claudio Scordino, git, Johannes.Schindelin, Sam Vilain Alex Riesen <raa.lkml@gmail.com> writes: > Claudio Scordino, Wed, Jul 11, 2007 17:29:19 +0200: >> >>If no, does exist any easy way of creating such hook ? >> > >> >What for? What do you want to do? >> > >> I just need my script to be called after a pull. My script just sends an >> email saying that the repository has been pulled (I already did it for the >> push). > > Ach, on _remote_ repo. Where it is _pulled_from_. > There are none. You can catch log output of git-daemon, but... > Isn't it a bit extreme? A fetch (part of a pull) is *very* common > operation, sometime you'll get a *real* lot of mail. > > P.S. BTW, there is no hooks for pull in local (where it is pulled > into): it is not needed, you already control everything what happens. I am not sure I am reading this exchange correctly, but I think Claudio wants to say $ git pull repo.or.cz:somebody/project.git/ the-branch and have it automatically send e-mail to the somebody (obviously the hook script needs to have a mapping from the repository to whom to notify). As the daemon side cannot tell if the local is only fetching (and possibly discarding the result) or pulling (resulting in a merge), I do not think it is reasonable to do the hooking on the remote side. It has to be done on the local if ever. As you said, the local side has all the control, so in the strictest sense there is no need for post-* hook, but we do support a few hooks for local operations, such as post-commit. (Sam Vilain CC'ed as he wanted to have hooks during and after a merge). I suspect that a post merge hook (that also is called in fast-forward case) would be a good thing to have if people would want to do this kind of thing often. The hook most likely wants to get the ORIG_HEAD and the updated HEAD as parameters, and can act differently based on the nature of the merge (e.g. was it fast-forward, was it a merge between the commits made by the same committer as myself, etc.) ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-07-11 21:27 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-07-11 14:41 Hook after pull ? Claudio Scordino 2007-07-11 14:51 ` Alex Riesen 2007-07-11 15:29 ` Claudio Scordino 2007-07-11 18:33 ` Alex Riesen 2007-07-11 21:26 ` Junio C Hamano
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).