Revert "Clear existing Change-Ids from description if issue is 0"
This reverts commit 36d937d16d8bd346f6b01bef64b87f954bfecf32.
Reason for revert: Not sure the best way to notify you about this, but suspect this is the root cause of https://chat.google.com/room/AAAAXGgrwSo/hZDeSAsoQ4k
Verified via rolling back depot_tools
Original change's description:
> Clear existing Change-Ids from description if issue is 0
>
> git cl upload may not create a new change even if issue is 0 because
> of a leftover Change-Id footer in the commit message.
>
> Bug: 1484251
> Change-Id: Ibee0542e0f5a2cbf930b1882892fbb7640054b69
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4880971
> Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
> Commit-Queue: Gavin Mak <gavinmak@google.com>
Bug: 1484251
Change-Id: Ic3230fd7432f57bf9f3d0266b2e2c0df6a7e9bae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4893199
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
diff --git a/git_cl.py b/git_cl.py
index cfb6234..d1936ec 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1788,12 +1788,6 @@
bug = options.bug
fixed = options.fixed
if not self.GetIssue():
- # There isn't any issue attached, so we shouldn't keep existing
- # Change-Ids in the description.
- if git_footers.get_footer_change_id(description):
- description = git_footers.remove_footer(description,
- 'Change-Id')
-
# Extract bug number from branch name, but only if issue is being
# created. It must start with bug or fix, followed by _ or - and
# number. Optionally, it may contain _ or - after number with
@@ -1835,7 +1829,7 @@
def _GetTitleForUpload(self, options, multi_change_upload=False):
# type: (optparse.Values, Optional[bool]) -> str
- # Getting titles for multiple commits is not supported so we return the
+ # Getting titles for multipl commits is not supported so we return the
# default.
if not options.squash or multi_change_upload or options.title:
return options.title