]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
scripts/git: Improve branch list comments
authorteor <teor@torproject.org>
Wed, 15 Jan 2020 02:28:00 +0000 (12:28 +1000)
committerteor <teor@torproject.org>
Wed, 15 Jan 2020 02:28:00 +0000 (12:28 +1000)
Hopefully, these explanations make it easier to get the next branch
transition right.

Part of 32772.

scripts/git/git-merge-forward.sh
scripts/git/git-pull-all.sh
scripts/git/git-push-all.sh

index 8e61f6e644036cee531211bb22dcad3319f5507d..bbc5047cb70ac31b0d0944f115d8e852ff57bf3e 100755 (executable)
@@ -87,8 +87,10 @@ TOR_WKT_NAME=${TOR_WKT_NAME:-"tor-wkt"}
 # New arrays need to be in the WORKTREE= array else they aren't considered.
 #
 # Only used in test branch mode
-# There is no previous branch to merge forward, so the second and fifth items
-# must be blank ("")
+# We create a test branch for the earliest maint branch.
+# But it's the earliest maint branch, so we don't merge forward into it.
+# Since we don't merge forward into it, the second and fifth items must be
+# blank ("").
 MAINT_035_TB=( "maint-0.3.5" "" "$GIT_PATH/$TOR_WKT_NAME/maint-0.3.5" \
     "_035" "")
 # Used in maint/release merge and test branch modes
@@ -172,8 +174,8 @@ if [ -z "$TEST_BRANCH_PREFIX" ]; then
 
   # maint/release merge mode
   #
-  # List of all worktrees to work on. All defined above. Ordering is important.
-  # Always the maint-* branch BEFORE then the release-*.
+  # List of all worktrees to merge forward into. All defined above.
+  # Ordering is important. Always the maint-* branch BEFORE the release-*.
   WORKTREE=(
     # We don't merge forward into MAINT_035_TB[@], because it's the earliest
     # maint branch
@@ -193,7 +195,10 @@ if [ -z "$TEST_BRANCH_PREFIX" ]; then
 
 else
 
-  # Test branch mode: merge to maint only
+  # Test branch mode: base test branches on maint branches only
+  #
+  # List of all worktrees to create test branches from. All defined above.
+  # Ordering is important. All maint-* branches, including the earliest one.
   WORKTREE=(
     # We want a test branch based on the earliest maint branch
     MAINT_035_TB[@]
index 6e02093adf05ae2d5f39f9caf1f3be825fed179e..c8d115da0105daa1124949629fd16765def27317 100755 (executable)
@@ -91,8 +91,7 @@ EOF
 # Git worktrees to manage #
 ###########################
 
-# List of all worktrees to work on. All defined above. Ordering is important.
-# Always the maint-* branch first then the release-*.
+# List of all worktrees to pull. All defined above. Ordering is not important.
 WORKTREE=(
   MAINT_035[@]
   RELEASE_035[@]
index 466b843f35645c85967c141b324c2d039302630f..0abddc8023f3cdbda66545e37c0325deacb4e257 100755 (executable)
@@ -97,9 +97,10 @@ PUSH_SAME=${TOR_PUSH_SAME:-0}
 # Argument processing #
 #######################
 
-# Controlled by the -t <test-branch-prefix> option. The test branch base
-# name option makes git-merge-forward.sh create new test branches:
-# <tbbn>_035, <tbbn>_040, ... , <tbbn>_master, and merge forward.
+# Controlled by the -t <test-branch-prefix> option. The test branch prefix
+# option makes git-merge-forward.sh create new test branches:
+# <tbp>_035, <tbp>_040, ... , <tbp>_master, and merge each branch forward into
+# the next one.
 TEST_BRANCH_PREFIX=
 
 while getopts ":hr:st:" opt; do
@@ -200,7 +201,7 @@ PUSH_BRANCHES=$(echo \
 
 if [ -z "$TEST_BRANCH_PREFIX" ]; then
 
-  # maint/release push mode
+  # maint/release push mode: push all branches.
   #
   # List of branches to push. Ordering is not important.
   PUSH_BRANCHES=$(echo \
@@ -212,6 +213,8 @@ if [ -z "$TEST_BRANCH_PREFIX" ]; then
     )
 else
 
+  # Test branch push mode: push test branches, based on each maint branch.
+  #
   # List of branches to push. Ordering is not important.
   PUSH_BRANCHES=" \
     ${TEST_BRANCH_PREFIX}_master \