git cl patch fails when remote origin has a trailing slash |
||
Issue descriptionToday I discovered an interesting minor bug in git cl patch; when the remote origin URL has a trailing slash, git cl doesn't work as expected. To repro: mkdir /tmp/repro cd /tmp/repro git clone https://chromium.googlesource.com/infra/gerrit-plugins/buildbucket/ cd buildbucket git cl patch 1019615 Actual result: Trying to patch a change from https://chromium.googlesource.com/infra/gerrit-plugins/buildbucket but this repo appears to be https://chromium.googlesource.com/infra/gerrit-plugins/buildbucket/. Expected result: Committed patch for change 1019615 patchset 1 locally. Note: this created a local commit which does not have the same hash as the one uploaded for review. This will make uploading changes based on top of this branch difficult. If you want to do that, use "git cl patch --force" instead. Workaround: Edit the remote URL in .git/config The fix should probably be a change somewhere around here: https://cs.chromium.org/chromium/tools/depot_tools/git_cl.py?l=2801
,
Nov 30
|
||
►
Sign in to add a comment |
||
Comment 1 by foss...@gmail.com
, May 8 2018853 bytes
853 bytes Download