4

There were 2 different pull requests: A and B. When the A pull request has been merged into master in Stash, Stash shows that pull request B has been merged remotely (but it didn't!). Somehow it worked automatically. There are no hooks.

I tried running:

git log --merges

But I can't see the merge commit for B.

Can you please help?

The git tree is as follows:

*   c8372e0 (HEAD, master) Merge branch 'master' of http://...
|\
| *   b091241 (origin/master, origin/HEAD) Merge pull request #193 in ...
| |\
| | * 629fb1f (origin/feature/A Fix
...
| | * e9042fb (origin/feature/B) 
| | *   d84a03c Merge branch 'master' into feature/B
SQB
  • 3,926
  • 2
  • 28
  • 49
Ivan Voroshilin
  • 5,233
  • 3
  • 32
  • 61

1 Answers1

6

I found the answer:

Branch A was created not from a master but from branch B. When A's pull request is merged, B is merged as well automatically.

The reason: They have the same parent

You can check it with git command to find a common ancestor of two commits, e.g.:

git merge-base -a 629fb1f e9042fb
Community
  • 1
  • 1
Ivan Voroshilin
  • 5,233
  • 3
  • 32
  • 61