• chase@chromium.org's avatar
    Call git diff --name-status with a relative path. · 37c629a3
    chase@chromium.org authored
    On a new Linux box, during git cl dcommit I observed
    the error:
    
      fatal: invalid diff option/value: -r
    
    This was caused by the git cl presubmit hooks running:
    
      git diff --name-status -r refs/remotes/origin/trunk.. /path/to/src
    
    By passing a relative path (given by git rev-parse
    --show-cdup) instead of an absolute path for
    /path/to/src, git diff --name-status does not print an
    error and returns the expected list of changed files.
    
    Also fix some broken scm and gclient_scm unit tests.
    
    BUG=none
    TEST=git presubmit hooks work from main working
    directory
    Review URL: http://codereview.chromium.org/438012
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@32999 0039d316-1c4b-4281-b951-d872f2087c98
    37c629a3
Name
Last commit
Last update
bootstrap Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
LICENSE Loading commit data...
PRESUBMIT.py Loading commit data...
README Loading commit data...
README.gclient Loading commit data...
README.git-cl Loading commit data...
README.git-cl.codereview Loading commit data...
WATCHLISTS Loading commit data...
chrome-update-create-task.bat Loading commit data...
chrome-update.bat Loading commit data...
chrome-update.py Loading commit data...
cpplint.bat Loading commit data...
cpplint.py Loading commit data...
create-chromium-git-src Loading commit data...
drover Loading commit data...
drover.bat Loading commit data...
drover.py Loading commit data...
gcl Loading commit data...
gcl.bat Loading commit data...
gcl.py Loading commit data...
gclient Loading commit data...
gclient.bat Loading commit data...
gclient.py Loading commit data...
gclient_scm.py Loading commit data...
gclient_utils.py Loading commit data...
git-cl Loading commit data...
git-cl-upload-hook Loading commit data...
git-gs Loading commit data...
git-try Loading commit data...
git_cl_hooks.py Loading commit data...
hammer Loading commit data...
hammer.bat Loading commit data...
presubmit_canned_checks.py Loading commit data...
presubmit_support.py Loading commit data...
profile.xml Loading commit data...
revert Loading commit data...
revert.bat Loading commit data...
revert.py Loading commit data...
scm.py Loading commit data...
trychange.py Loading commit data...
upload.py Loading commit data...
watchlists.py Loading commit data...