New issue
Advanced search Search tips

Issue 803918 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

git cl patch breaks when target CL is in a different repo

Project Member Reported by brucedaw...@chromium.org, Jan 19 2018

Issue description

I made the mistake of running "git cl patch -b ..." when I had four 2 GB files in my src/ directory. It's still running. The output looks like this:

c:\src\chromium3\src\v8>git cl patch -b jumbo_fix 872230
Switched to branch jumbo_fix.
warning: no common commits
remote: Sending approximately 8.20 GiB ...
remote: Counting objects: 1137, done
remote: Finding sources: 100% (9781230/9781230)
remote: Total 9781230 (delta 7831615), reused 9689700 (delta 7831615)
Receiving objects: 100% (9781230/9781230), 8.06 GiB | 7.61 MiB/s, done.
Resolving deltas:  50% (3950433/7831615)

I didn't want or need it to send the 8.20 GiB of data. I would rather have had an error or have the data ignored. "git rebase-update" handles this (by failing with an informative error message) (see  bug 376099 ).

 
Looking moire closely I realized that the real reason it failed was because I was in the wrong directory. It was trying to patch a chromium change into v8.

So the updated request is that this warning should be an error, or should at least ask the user whether they really want to continue down this impossible path:

> warning: no common commits

Comment 2 by aga...@chromium.org, Jan 19 2018

Owner: aga...@chromium.org
Status: Started (was: Untriaged)
Summary: git cl patch breaks when target CL is in a different repo (was: git cl patch breaks when too much untracked data present)
Easy enough to fix, I think: https://chromium-review.googlesource.com/#/c/chromium/tools/depot_tools/+/876930
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools/+/697a91b72a21e812cb51630f51c20fbbae61ea11

commit 697a91b72a21e812cb51630f51c20fbbae61ea11
Author: Aaron Gable <agable@chromium.org>
Date: Fri Jan 26 19:31:55 2018

git-cl-patch: fail if patching from a different repo

I don't know of any use-case where someone would want to
use git-cl-patch to pull a (e.g.) chromium change into
their (e.g.) v8 checkout.

Bug:  803918 
Change-Id: Id53f1cc3ab97e623d0098bb366a573b18b54e91a
Reviewed-on: https://chromium-review.googlesource.com/876930
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>

[modify] https://crrev.com/697a91b72a21e812cb51630f51c20fbbae61ea11/tests/git_cl_test.py
[modify] https://crrev.com/697a91b72a21e812cb51630f51c20fbbae61ea11/git_cl.py

Comment 4 by aga...@chromium.org, Jan 26 2018

Status: Fixed (was: Started)

Sign in to add a comment