[kde-community] What is a GitHub pull request exactly?

Kevin Krammer krammer at kde.org
Sat Sep 19 16:32:33 BST 2015


I have some difficulty understanding the perceived difference in workflow, so 
I'd like to get some input on where my line of thinking and reality differ :-)

The following example deals with clones of a repository and the revision of 
HEAD in the master branch.

Example: akonadiclient, three developers (Bhaskar, Jonathan, Kevin).

Repo: revision of HEAD at master

1) Initial situation

git.kde.org: acbd

Bhaskar: abcd
Jonathan: abcd
Kevin: abcd

2) Kevin creates a patch

git.kde.org: acbd

Bhaskar: abcd
Jonathan: abcd
Kevin: ghij

3) Patch goes to reviewboard

git.kde.org: acbd

Bhaskar: abcd
Jonathan: abcd
Kevin: ghij

4) Patch is reviewed and gets "Ship it". Kevin pushes to git.kde.org

git.kde.org: ghij

Bhaskar: abcd
Jonathan: abcd
Kevin: ghij

5) The other developers update

git.kde.org: ghij

Bhaskar: ghij
Jonathan: ghij
Kevin: ghij

6) KDE gets a github mirror

git.kde.org: ghij
github: ghij

Bhaskar: ghij
Jonathan: ghij
Kevin: ghij

7) A new developer, Fred, clones on github

git.kde.org: ghij
github: ghij
Fred's clone: ghij

Bhaskar: ghij
Jonathan: ghij
Kevin: ghij

8) Fred creates a patch

git.kde.org: ghij
github: ghij
Fred's clone: ghij

Bhaskar: ghij
Jonathan: ghij
Kevin: ghij
Fred: klmn

9) Fred pushes to his clone

git.kde.org: ghij
github: ghij
Fred's clone: klmn

Bhaskar: ghij
Jonathan: ghij
Kevin: ghij
Fred: klmn

10) Fred makes a pull request

git.kde.org: ghij
github: ghij
Fred's clone: klmn

Bhaskar: ghij
Jonathan: ghij
Kevin: ghij
Fred: klmn

Ok, now my understanding is there are two options: (a) someone pulls from 
Fred's clone (b) there is a merge option on GitHub

11a) Kevin pulls from Fred's clone

git.kde.org: ghij
github: ghij
Fred's clone: klmn

Bhaskar: ghij
Jonathan: ghij
Kevin: klmn
Fred: klmn

12a) Kevin puts Fred's patch up on review, pushes it to git.kde.org once it 
gets "Ship it"
 
git.kde.org: klmn
github: klmn
Fred's clone: klmn

Bhaskar: ghij
Jonathan: ghij
Kevin: klmn
Fred: klmn

11b) Kevin used the merge option on github

git.kde.org: ghij
github: klmn
Fred's clone: klmn

Bhaskar: ghij
Jonathan: ghij
Kevin: ghij
Fred: klmn

12b) Kevin pulls from github

git.kde.org: ghij
github: klmn
Fred's clone: klmn

Bhaskar: ghij
Jonathan: ghij
Kevin: klmn
Fred: klmn

13b) Kevin puts the patch of for review, pushes to git.kde.org when it gets 
"Ship it"

git.kde.org: klmn
github: klmn
Fred's clone: klmn

Bhaskar: ghij
Jonathan: ghij
Kevin: klmn
Fred: klmn

So (a) and (b) workflows differ in that in (a) github mirror and git.kde.org 
have the same state, while in (b) the mirror is for a period of time not 
actually a mirror, but "ahead".

Where "ahead" could also mean wrong if "klmn" needs to be modified or gets 
rejected.

Is (b) the problem people keep discussing about?

Because as far as I can tell it is not really an option given that it can lead 
to an inconsistent state of two clone sources that are considered to be 
mirrored.

If the problem is somewhere in (a), where is it?

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-community/attachments/20150919/8f23ef60/attachment.sig>


More information about the kde-community mailing list