If the merge is a FF, the receiving end has no idea a merge even happened,
they look like normal commits.  The post-receive doesn't know that a normal
commit has happened either for that matter, it just receives a bunch of
objects and the new sha1 that the repo should point to... as I said, every
non-forced push is a fast forward on the receiving end, even if the commits
pushed were merges.  When you parse over the commits you can find out if the
commit itself is a merge, of course.

At any rate, you might want to direct your questions to the git mailing
list.  GitHub repos have post-receive hooks baked in, but users can't edit
the hooks directly in our repos.

    Tekkub
    GitHub Tech Support
    http://support.github.com/
    Join us on IRC: #github on freenode.net
    Discussion group: [email protected]


On Thu, Oct 29, 2009 at 2:01 PM, Peter Shenkin <[email protected]> wrote:

>
> On Thu, Oct 29, 2009 at 3:11 PM, Tekkub <[email protected]> wrote:
> > Postreceive will never know about a fast-forward merge... every push is a
> > fast-forward to the remote side unless you use the --force flag, because
> the
> > remote rejects non-fast-forwards by default.
>
> I think you may be misunderstanding the question, based on the
> assertion "the remote rejects non-fast-forwards by default."
>
> I'm not talking about a merge with a remote branch.  I'm talking about
> what happens if I do a merge locally, then push it.
>
> Locally, I merge B into A, then I push A. If the merge is a non-ff
> merge, there is a merge commit, and on reception, the my
> post-receive-email script (which I adapted from the defualt) sends out
> email that shows the merge commit's SHA1 with the log message (default
> or otherwise) from the merge.
>
> However, when the merge was carried out locally as a FF, there is no
> merge commit, and the post-receive-email script sends out a blank log
> message together with a bunch of via SHA1s and a from SHA1.
>
> I would like to be able to say, in the post-receive message, that this
> resulted from a FF merge of B into A, but would need a way to detect
> this condition.
>
> My guess is that it is not possible, but either way, that is the question.
>
> -P.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GitHub" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/github?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to