Git repositories in rb-gateway can now pull from an upstream remote.
Review Request #9347 — Created Nov. 4, 2017 and updated
A
Pull
method was added torepository.go
andgit_repository.go
.
This method is intended to behave likegit-pull
meaning it starts with
agit-fetch
and then agit-merge
. Fetching is made rather
straightforward thanks to git2go. However, the merge section ofPull
required a few more steps. First, a merge analysis is performed, then the
merge and lastly a commit is created.
I setup a remote repository on github, cloned it on my machine, pushed
a few changes and pulled those changes into my local copy using only
RB-Gateway's Pull method.
Description | From | Last Updated |
---|---|---|
pull should be a method on the Repository interface because we will want this support for both GitRepository and, in … |
brennie | |
Comments should end in a period. Likewise below. |
brennie | |
Can we keep this alphabetical? |
david | |
Can we put a blank line between each "operation" in here? |
david | |
Should be "Set up". "Right now only" should also be a separate sentence. |
david | |
Do we not want to return here? |
david | |
To match the other comments, this should be "Set up and perform." |
david | |
Because Repository is an abstract interface, the comment shouldn't refer to git. |
david | |
I'm not sure that we should hard-code master here, since that's git specific. Strictly speaking, we don't actually need to … |
david |
- Summary:
-
[WIP] RB-Gateway can now pull from a remoteRB-Gateway can now pull from a remote
- Description:
-
~ I added the file
pull.go
, it contains a pull function which behaves~ like a typical git-pull. Testing is still required. ~ A
Pull
method was added torepository.go
andgit_repository.go
.~ This method is intended to behave like git-pull
meaning it starts with+ a git-fetch
and then agit-merge
. Fetching is made rather+ straightforward thanks to git2go. However, the merge section of Pull
+ required a few more steps. First, a merge analysis is performed, then the + merge and lastly a commit is created. - Testing Done:
-
+ I setup a remote repository on github, cloned it on my machine, pushed
+ a few changes and pulled those changes into my local copy using only + RB-Gateway's Pull method. More testing needs to be done. - Commit:
-
7a8047eca329fefbe6f0604278cac91c6e1202c444ffb947805b9f7d484c22ef3ee7b54cb50aab65
- Diff:
-
Revision 2 (+231 -8)
Checks run (2 succeeded)
- Commit:
-
44ffb947805b9f7d484c22ef3ee7b54cb50aab653d040c445e1350e0b0aa3827c76040f7ea9575fa
- Diff:
-
Revision 3 (+140)
Checks run (2 succeeded)
- Commit:
-
3d040c445e1350e0b0aa3827c76040f7ea9575fa88a011a87bde0fe8fdad693a581f085c738e533a
- Diff:
-
Revision 4 (+149 -2)