If you use "git show" it will tell you the parents of the commit eg:
$ git show
commit 918f3de1c99697be7057c401a245bc57a788483f
Merge: 3b23866 3fce69c
Date: Wed Jan 22 07:59:12 2014 -0800
Merge pull request #3139 from 9rnsr/fix11968
Issue 11968 - ICE(expression.c) Crash when deleting __FILE__
Using git show on the parents will tell you what each was:
$ git show 3b23866
commit 3b23866da32b98426bbb94011c19bf928102e01f
Merge: e1bb12f d031e96
Date: Wed Jan 22 05:25:46 2014 -0800
Merge pull request #3137 from 9rnsr/fix11967
[REG2.065a] Issue 11967 - ICE(parse.c) Parser crash
Which makes it clear that commit (the first one, or -m1) was the master branch and the other was the pull request.
In general the first one will always be the old master commit and should be set as the mainline.
As always, make sure to check in gitk or github diff or something similar that what you wanted is what actually happened before pushing to upstream.