chiark / gitweb /
git-debpush: Subheaders
authorSean Whitton <spwhitton@spwhitton.name>
Fri, 19 Jul 2019 15:33:01 +0000 (16:33 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 20 Jul 2019 16:05:27 +0000 (17:05 +0100)
No functional change.

Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
git-debpush

index 0ddbfc47301f331a87b3f4a4db219e4d7db5c7ef..e2ea2b64adf939a03686db14518ba2a11f12029d 100755 (executable)
@@ -35,7 +35,7 @@ set -o pipefail
 #   mode; if there is a previous tag, and no quilt mode provided, assume
 #   same quilt mode as in previous tag created by this script
 
-# ---- Helper functions and variables
+# **** Helper functions and variables ****
 
 us="$(basename $0)"
 
@@ -86,7 +86,7 @@ find_last_tag () {
     set -o pipefail
 }
 
-# ---- Parse command line
+# **** Parse command line ****
 
 getopt=$(getopt -s bash -o 'nfu:' \
               -l 'no-push,force,branch:,remote:,distro:,upstream:,quilt:,gbp,dpm,\
@@ -137,7 +137,7 @@ case "$quilt_mode" in
     *) badusage "invalid quilt mode: $quilt_mode" ;;
 esac
 
-# ---- Gather git information
+# **** Gather git information ****
 
 remoteconfigs=()
 to_push=()
@@ -186,7 +186,7 @@ if $pushing && [ "x$remote" = "x" ]; then
     fi
 fi
 
-# ---- Gather source package information
+# **** Gather source package information ****
 
 temp=$(mktemp -d)
 trap cleanup EXIT
@@ -216,7 +216,7 @@ case "$format" in
        ;;
 esac
 
-# ---- Gather git history information
+# **** Gather git history information ****
 
 last_debian_tag=$(find_last_tag "debian/")
 last_archive_tag=$(find_last_tag "archive/debian/")
@@ -247,12 +247,16 @@ if $upstream; then
     to_push+=("$upstream_tag")
 fi
 
-# ---- Useful sanity checks
+# **** Useful sanity checks ****
+
+# ---- UNRELEASED suite
 
 if [ "$target" = "UNRELEASED" ]; then
     fail_check "UNRELEASED changelog"
 fi
 
+# ---- Pushing dgit view to maintainer view
+
 if ! [ "x$last_debian_tag" = "x" ] && ! [ "x$last_archive_tag" = "x" ]; then
     last_debian_tag_c=$(git rev-parse "$last_debian_tag"^{})
     last_archive_tag_c=$(git rev-parse "$last_archive_tag"^{})
@@ -264,6 +268,8 @@ if ! [ "x$last_debian_tag" = "x" ] && ! [ "x$last_archive_tag" = "x" ]; then
     fi
 fi
 
+# ---- Targeting different suite
+
 if ! [ "x$last_debian_tag" = "x" ]; then
     temp=$(mktemp -d)
     trap cleanup EXIT
@@ -279,6 +285,8 @@ if ! [ "x$last_debian_tag" = "x" ]; then
     fi
 fi
 
+# ---- Upstream tag is not ancestor of $branch
+
 if ! [ "x$upstream_tag" = "x" ] \
         && ! git merge-base --is-ancestor "$upstream_tag" "$branch" \
         && ! [ "$quilt_mode" = "baredebian" ]; then
@@ -286,12 +294,13 @@ if ! [ "x$upstream_tag" = "x" ] \
  "upstream tag $upstream_tag is not an ancestor of $branch; probably a mistake"
 fi
 
+# ---- Summary
 
 if ! $force && $failed_check; then
     fail "some checks failed; you can override with --force"
 fi
 
-# ---- Create the git tag
+# **** Create the git tag ****
 
 # convert according to DEP-14 rules
 git_version=$(echo $version | tr ':~' '%_' | sed 's/\.(?=\.|$|lock$)/.#/g')
@@ -330,7 +339,7 @@ $source release $version for $target
 [dgit please-upload$upstream_info]
 EOF
 
-# ---- Do a git push
+# **** Do a git push ****
 
 if $pushing; then
     git push "$remote" "${to_push[@]}"