This is an automated email from the ASF dual-hosted git repository.
dcapwell pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push:
new a2c3d5a how_to_commit.rst missing dash in git commands, added
recommendation to compile before commit, and documented that a merge -s ours is
needed for older branches even if they do not impact trunk
a2c3d5a is described below
commit a2c3d5a4ce810d02085ace97bee21e187e67aa7e
Author: David Capwell <[email protected]>
AuthorDate: Mon Jul 27 11:32:57 2020 -0700
how_to_commit.rst missing dash in git commands, added recommendation to
compile before commit, and documented that a merge -s ours is needed for older
branches even if they do not impact trunk
patch by David Capwell; reviewed by Brandon Williams for CASSANDRA-15982
---
doc/source/development/how_to_commit.rst | 37 ++++++++++++++++++++++++++------
1 file changed, 30 insertions(+), 7 deletions(-)
diff --git a/doc/source/development/how_to_commit.rst
b/doc/source/development/how_to_commit.rst
index dff3983..528ac40 100644
--- a/doc/source/development/how_to_commit.rst
+++ b/doc/source/development/how_to_commit.rst
@@ -27,46 +27,69 @@ Hypothetical CASSANDRA-12345 ticket is a cassandra-3.0
based bug fix that requir
On cassandra-3.0:
#. ``git am -3 12345-3.0.patch`` (if we have a problem b/c of CHANGES.txt
not merging anymore, we fix it ourselves, in place)
+ #. ``ant realclean && ant jar build-test`` (rebuild to make sure code
compiles)
On cassandra-3.3:
#. ``git merge cassandra-3.0 -s ours``
#. ``git apply -3 12345-3.3.patch`` (likely to have an issue with
CHANGES.txt here: fix it ourselves, then git add CHANGES.txt)
- #. ``git commit -amend``
+ #. ``ant realclean && ant jar build-test`` (rebuild to make sure code
compiles)
+ #. ``git commit --amend``
On trunk:
#. ``git merge cassandra-3.3 -s ours``
#. ``git apply -3 12345-trunk.patch`` (likely to have an issue with
CHANGES.txt here: fix it ourselves, then git add CHANGES.txt)
- #. ``git commit -amend``
+ #. ``ant realclean && ant jar build-test`` (rebuild to make sure code
compiles)
+ #. ``git commit --amend``
On any branch:
- #. ``git push origin cassandra-3.0 cassandra-3.3 trunk -atomic``
+ #. ``git push origin cassandra-3.0 cassandra-3.3 trunk --atomic``
Same scenario, but a branch-based contribution:
On cassandra-3.0:
#. ``git cherry-pick <sha-of-3.0-commit>`` (if we have a problem b/c of
CHANGES.txt not merging anymore, we fix it ourselves, in place)
+ #. ``ant realclean && ant jar build-test`` (rebuild to make sure code
compiles)
On cassandra-3.3:
#. ``git merge cassandra-3.0 -s ours``
#. ``git format-patch -1 <sha-of-3.3-commit>``
#. ``git apply -3 <sha-of-3.3-commit>.patch`` (likely to have an issue with
CHANGES.txt here: fix it ourselves, then git add CHANGES.txt)
- #. ``git commit -amend``
+ #. ``ant realclean && ant jar build-test`` (rebuild to make sure code
compiles)
+ #. ``git commit --amend``
On trunk:
#. ``git merge cassandra-3.3 -s ours``
#. ``git format-patch -1 <sha-of-trunk-commit>``
#. ``git apply -3 <sha-of-trunk-commit>.patch`` (likely to have an issue
with CHANGES.txt here: fix it ourselves, then git add CHANGES.txt)
- #. ``git commit -amend``
+ #. ``ant realclean && ant jar build-test`` (rebuild to make sure code
compiles)
+ #. ``git commit --amend``
On any branch:
- #. ``git push origin cassandra-3.0 cassandra-3.3 trunk -atomic``
+ #. ``git push origin cassandra-3.0 cassandra-3.3 trunk --atomic``
+
+If the patch is for an older branch, and doesn't impact later branches (such
as trunk), we still need to merge up.
+
+On cassandra-3.0:
+ #. ``git cherry-pick <sha-of-3.0-commit>`` (if we have a problem b/c of
CHANGES.txt not merging anymore, we fix it ourselves, in place)
+ #. ``ant realclean && ant jar build-test`` (rebuild to make sure code
compiles)
+
+On cassandra-3.3:
+ #. ``git merge cassandra-3.0 -s ours``
+ #. ``ant realclean && ant jar build-test`` (rebuild to make sure code
compiles)
+
+On trunk:
+ #. ``git merge cassandra-3.3 -s ours``
+ #. ``ant realclean && ant jar build-test`` (rebuild to make sure code
compiles)
+
+On any branch:
+ #. ``git push origin cassandra-3.0 cassandra-3.3 trunk --atomic``
.. tip::
Notes on git flags:
``-3`` flag to am and apply will instruct git to perform a 3-way merge for
you. If a conflict is detected, you can either resolve it manually or invoke
git mergetool - for both am and apply.
- ``-atomic`` flag to git push does the obvious thing: pushes all or nothing.
Without the flag, the command is equivalent to running git push once per each
branch. This is nifty in case a race condition happens - you won’t push half
the branches, blocking other committers’ progress while you are resolving the
issue.
+ ``--atomic`` flag to git push does the obvious thing: pushes all or
nothing. Without the flag, the command is equivalent to running git push once
per each branch. This is nifty in case a race condition happens - you won’t
push half the branches, blocking other committers’ progress while you are
resolving the issue.
.. tip::
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]