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 … |
|
|
Comments should end in a period. Likewise below. |
|
|
Can we keep this alphabetical? |
|
|
Can we put a blank line between each "operation" in here? |
|
|
Should be "Set up". "Right now only" should also be a separate sentence. |
|
|
Do we not want to return here? |
|
|
To match the other comments, this should be "Set up and perform." |
|
|
Because Repository is an abstract interface, the comment shouldn't refer to git. |
|
|
I'm not sure that we should hard-code master here, since that's git specific. Strictly speaking, we don't actually need to … |
|
-
-
pull.go (Diff revision 1) pull
should be a method on theRepository
interface because we will want this support for bothGitRepository
and, in the future,HgRepository
(when support for mercurial is added). -

Summary: |
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||||||||
Testing Done: |
|
||||||||||||||||||||||||
Commit: |
|
||||||||||||||||||||||||
Diff: |
Revision 2 (+231 -8) |
Checks run (2 succeeded)

Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+140) |
Checks run (2 succeeded)
-
-
-
-
git_repository.go (Diff revision 3) Should be "Set up". "Right now only" should also be a separate sentence.
-
-
git_repository.go (Diff revision 3) To match the other comments, this should be "Set up and perform."
-
repository.go (Diff revision 3) Because Repository is an abstract interface, the comment shouldn't refer to git.
-
util.go (Diff revision 3) I'm not sure that we should hard-code master here, since that's git specific.
Strictly speaking, we don't actually need to pull, we just need to do a
git fetch --all

Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+149 -2) |