• rob@robwu.nl's avatar
    git-drover: Correctly resolve --parent_checkout · 93aa0739
    rob@robwu.nl authored
    git rev-parse --git-dir returns a relative path, e.g. ".git". This
    should be resolved relative to the cwd of the git command instead of the
    current working dir. The cwd of the git command is set to _parent_repo
    (=the absolute path after resolving --parent_checkout), so use that.
    
    TEST=The following completes without errors.
    $ cd /tmp
    $ git init somegitrepo
    $ cd somegitrepo
    $ git drover --branch [branch] --cherry-pick [hash] -v --dry-run --parent_checkout /path/to/src
    $ cd /path/to/src
    $ git drover --branch [branch] --cherry-pick [hash] -v --dry-run
    
    Review URL: https://codereview.chromium.org/1640233002
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298416 0039d316-1c4b-4281-b951-d872f2087c98
    93aa0739
git_drover.py 13.8 KB