• 
      

    Git repositories in rb-gateway can now pull from an upstream remote.

    Review Request #9347 — Created Nov. 4, 2017 and updated

    Information

    rb-gateway
    master
    88a011a...

    Reviewers

    A Pull method was added to repository.go and git_repository.go.
    This method is intended to behave like git-pull meaning it starts with
    a git-fetch and then a git-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.

    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 …

    brenniebrennie

    Comments should end in a period. Likewise below.

    brenniebrennie

    Can we keep this alphabetical?

    daviddavid

    Can we put a blank line between each "operation" in here?

    daviddavid

    Should be "Set up". "Right now only" should also be a separate sentence.

    daviddavid

    Do we not want to return here?

    daviddavid

    To match the other comments, this should be "Set up and perform."

    daviddavid

    Because Repository is an abstract interface, the comment shouldn't refer to git.

    daviddavid

    I'm not sure that we should hard-code master here, since that's git specific. Strictly speaking, we don't actually need to …

    daviddavid
    brennie
    1. 
        
    2. pull.go (Diff revision 1)
       
       
      Show all issues

      pull should be a method on the Repository interface because we will want this support for both GitRepository and, in the future, HgRepository (when support for mercurial is added).

    3. pull.go (Diff revision 1)
       
       
      Show all issues

      Comments should end in a period. Likewise below.

    4. 
        
    hmarceau
    hmarceau
    hmarceau
    hmarceau
    hmarceau
    david
    1. 
        
    2. git_repository.go (Diff revision 3)
       
       
       
       
       
       
      Show all issues

      Can we keep this alphabetical?

    3. git_repository.go (Diff revision 3)
       
       
       
      Show all issues

      Can we put a blank line between each "operation" in here?

    4. git_repository.go (Diff revision 3)
       
       
      Show all issues

      Should be "Set up". "Right now only" should also be a separate sentence.

    5. git_repository.go (Diff revision 3)
       
       
      Show all issues

      Do we not want to return here?

    6. git_repository.go (Diff revision 3)
       
       
      Show all issues

      To match the other comments, this should be "Set up and perform."

    7. repository.go (Diff revision 3)
       
       
      Show all issues

      Because Repository is an abstract interface, the comment shouldn't refer to git.

    8. util.go (Diff revision 3)
       
       
      Show all issues

      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

      1. I'd like to address this issue in a future commit. I plan on reconciling both
        of my projects and getting rid of hard coded git specifics will be a significant
        part of that effort. Also, since git repos are currently the only repository supported
        by RB-Gateway hardcoding "master" doesn't break anything.

    9. 
        
    hmarceau
    Review request changed
    Commit:
    3d040c445e1350e0b0aa3827c76040f7ea9575fa
    88a011a87bde0fe8fdad693a581f085c738e533a

    Checks run (2 succeeded)

    flake8 passed.
    JSHint passed.