Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Github implemented its Pull Request feature [closed]

I have question about GitHub — how they implemented Pull Request feature. Git SCM itself has git-request-pull commands. According to this answer GitHub can use git-request-pull and git-format-patch to do this.

How they implemented this feature? And what about Gitorious and Gitlab? How they did the same?

like image 740
Vlad Tsepelev Avatar asked Mar 24 '23 05:03

Vlad Tsepelev


1 Answers

They store the name of the branch from which you want to pull and generate diffs using git diff ^target-branch pull-head. When you accept the pull request, they simply run git merge pull-base.

They do not use git request-pull. There is even a discussion where Linus Torwalds insults them for it :)

like image 100
Chronial Avatar answered Mar 25 '23 20:03

Chronial