On Fri, 1 Apr 2016 06:18:35 -0700 (PDT)
Fabio Graciotti <fabio.gracio...@gmail.com> wrote:

> I need to intercept the pull request to my remote git repository. I
> mean that when a client executes a pull request to git server, the
> git server control him user name in order to control if has the
> access rights. I wrote a script that controls the push request, i
> just need a similar script for the pull request. 

I may be completely missing the point but I'm afraid that like too many
novice Git users you have become fixated on the term "pull request".

Git itself does not have any notion of "pull requests", and such thing
means some action one developer requests from another developer --
typically in charge of the integration work for a particular project.

So let's assume you wanted instead to refer to the `git pull` command.
If yes, the explanation of what you'd need to do is simple: `git pull`
first calls `git fetch` for the specified (or inferred) refs (heads,
tags etc) and them merges them to the current branch.
Hence the hooks (or whatever you're conjuring) in your repository
should intercept the fetch requests from remote Git instances.

You did not tell us exactly where your "intercepting" code is sitting
so I have to guess.  If your code is working between a HTTP server and
the Git backend or between remote Git instances speaking HTTP or Git
wire protocol and the Git repository, you'd need to intercept calls to
`git upload-pack` because that's the program which "answers" requests
performed by remote calls to `git fetch` in the "serving" repository.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to