Doc: Add tips about git new-branch --upstream_current and git cl issue
This CL adds tips about `git new-branch --upstream_current` and `git
cl issue` to commit_checklist.md. This CL also adds some tips about
testing.
Bug: None
Change-Id: I446ba3fd4997058fd26ae032013cd470cc1ee0fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2796214
Auto-Submit: Toby Huang <[email protected]>
Reviewed-by: Zork <[email protected]>
Commit-Queue: Zork <[email protected]>
Cr-Commit-Position: refs/heads/master@{#868688}
diff --git a/docs/commit_checklist.md b/docs/commit_checklist.md
index ca193083..3380498 100644
--- a/docs/commit_checklist.md
+++ b/docs/commit_checklist.md
@@ -25,7 +25,8 @@
You may also want to set another local branch as the upstream branch. You can do
that with `git checkout -b <branch_name> --track <upstream_branch>`. Do this if
you want to split your work across multiple CLs, but some CLs have dependencies
-on others.
+on others. Use `git new-branch --upstream_current <new_branch_name>` to create a
+new branch while setting the current branch as the upstream.
Mark the associated crbug as "started" so that other people know that you have
started working on the bug. Taking this step can avoid duplicated work.
@@ -78,6 +79,11 @@
[Simple Chrome][simple-chrome] instructions to deploy your changes to a test
device. Make sure you hit every code path you changed.
+Some testing tips:
+* Use LOG(ERROR) << "debug print statement" to for debugging. You can find
+ the logs in /var/logs/chrome/ on the ChromeOS device.
+* Use GDB for setting breakpoints while debugging.
+
Think about testing any edge cases that could break your code. Some common edge
cases to consider:
@@ -160,6 +166,11 @@
brackets in the commit message title, like [hashtag], will add a hashtag to
your CL. This feature is useful for grouping related CLs together.
+Check `git cl issue` to ensure that you are uploading to the correct Gerrit CL.
+If you are uploading a new CL, then the issue number will be none. Uploading
+will automatically create a new CL. Use `git cl issue <issue_number>` to target
+an existing CL for uploading new patches.
+
To help guide your reviewers, it is also recommended to provide a title for each
patchset summarizing the changes and indicating whose comments the patchset
addresses. Running `git cl upload` will upload a new patchset and prompt you for
@@ -240,5 +251,5 @@
[build-instructions]: https://chromium.googlesource.com/chromium/src.git/+/master/docs/#Checking-Out-and-Building
[chromium-tree]: https://ci.chromium.org/p/chromium/g/main/console
[contributing]: contributing.md
-[simple-chrome]: https://chromium.googlesource.com/chromiumos/docs/+/master/simple_chrome_workflow.md
+[simple-chrome]: https://chromium.googlesource.com/chromiumos/docs/+/HEAD/simple_chrome_workflow.md
[uploading-a-change-for-review]: contributing.md#Uploading-a-change-for-review