From 9bf2a2011acea186fac4089a94da46666ddacf6a Mon Sep 17 00:00:00 2001 From: Joanna Wang Date: Thu, 31 Oct 2024 00:54:59 +0000 Subject: [PATCH] Improve message about why someone might want to use --force during `git cl patch` Change-Id: I1c96164049513edb8e907928053b1eb09be2040f Fixes:b/375594912 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5979029 Commit-Queue: Josip Sokcevic Auto-Submit: Joanna Wang Reviewed-by: Josip Sokcevic --- git_cl.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/git_cl.py b/git_cl.py index bce00b911..aa5468d19 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2835,9 +2835,11 @@ class Changelist(object): print('Committed patch for change %i patchset %i locally.' % (parsed_issue_arg.issue, patchset)) print( - '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.\n' + 'Note: this created a local commit on top of parent commit ' + 'that is different from the one in Gerrit. If the patched CL ' + 'is not yours and you cannot upload new patches to it, you ' + 'will not be able to upload stacked changes created on top of ' + 'this branch.\n' 'If you want to do that, use "git cl patch --force" instead.') if self.GetBranch():