• 
      

    Fix GitClient.get_repository_info to not change the working directory.

    Review Request #9886 — Created April 23, 2018 and submitted

    Information

    RBTools
    release-1.0.x
    116237f...

    Reviewers

    One particularly annoying aspect of the GitClient is that it changes the
    working directory after scanning. This has a variety of impacts, and
    makes it hard to implement certain things like more advanced client
    detection.

    This change fixes it up so that we can pass in a cwd argument to
    Popen. Instead of changing the working directory for the entire
    process, we just do so for the subprocesses that get executed.

    • Ran unit tests on Python 2.7 and 3.6.
    • Did a variety of operations with a git repository.
    Description From Last Updated

    What are your thoughts on having this always strip (or strip by default, with an argument for changing that, or …

    chipx86chipx86
    chipx86
    1. 
        
    2. rbtools/clients/git.py (Diff revision 1)
       
       
      Show all issues

      What are your thoughts on having this always strip (or strip by default, with an argument for changing that, or opting into it)? We have a lot of call sites that strip, and I think most of the rest could strip without harm.

      Doesn't have to be this change, just something I noticed while going through this.

      1. Perhaps, but not for this change.

    3. 
        
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-1.0.x (85b95f6)