Use git push instead of git cl
The is easier as git-cl requires installing depot_tools, but there is
one downside. The first time `git push origin HEAD:refs/for/master` is
executed an error may occur:
$ git push origin HEAD:refs/for/master
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 12 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 1.02 KiB | 1.02 MiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2)
remote: Processing changes: refs: 1, done
remote: ERROR: commit ed2e8db: missing Change-Id in message footer
remote:
remote: Hint: to automatically insert a Change-Id, install the hook:
remote: f=`git rev-parse --git-dir`/hooks/commit-msg ; mkdir -p $(dirname $f) ; curl -Lo $f https://gerrit-review.googlesource.com/tools/hooks/commit-msg ; chmod +x $f
remote: and then amend the commit:
remote: git commit --amend --no-edit
remote: Finally, push your changes again
remote:
To https://gn.googlesource.com/gn
! [remote rejected] HEAD -> refs/for/master (commit ed2e8db: missing Change-Id in message footer)
error: failed to push some refs to 'https://gn.googlesource.com/gn'
The suggested solution will install .git/hooks/commit-msg from
https://gerrit-review.googlesource.com/tools/hooks/commit-msg. I find
seeing an error disconcerting but the provided instructions are adequate.
It is possible to install hooks automatically for example:
https://github.com/rycus86/githooks, but I suspect Google already
has a solution.
Change-Id: I15ae79a73e3aab6268a76629111d77a1781c6459
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/6562
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Brett Wilson <brettw@chromium.org>
diff --git a/AUTHORS b/AUTHORS
index 17b4959..b78d6a5 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -42,4 +42,5 @@
Tim Niederhausen <tim@rnc-ag.de>
Tomas Popela <tomas.popela@gmail.com>
Tripta Gupta <tripta.g@samsung.com>
+Wink Saville <wink@saville.com>
Yuriy Taraday <yorik.sar@gmail.com>
diff --git a/README.md b/README.md
index fae54e6..538b34d 100644
--- a/README.md
+++ b/README.md
@@ -75,12 +75,12 @@
Then, to upload a change for review:
git commit
- git cl upload --gerrit
+ git push origin HEAD:refs/for/master
When revising a change, use:
git commit --amend
- git cl upload --gerrit
+ git push origin HEAD:refs/for/master
which will add the new changes to the existing code review, rather than creating
a new one.