Question

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?

Was it helpful?

Solution

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 :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top