aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/4e8148a6-0022-46f7-90d9-851228e729a2/body2
-rw-r--r--.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/4e8148a6-0022-46f7-90d9-851228e729a2/values29
-rw-r--r--.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/55c16a2a-4877-4399-ae48-c5bb92010ef5/body35
-rw-r--r--.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/55c16a2a-4877-4399-ae48-c5bb92010ef5/values29
-rw-r--r--.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/599abbc1-7996-44e5-8a53-d0c38a98e259/body5
-rw-r--r--.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/599abbc1-7996-44e5-8a53-d0c38a98e259/values29
-rw-r--r--.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/values50
-rw-r--r--.be/e75fa81d-447c-41f5-8a36-888f899413df/settings1
-rw-r--r--.be/id-cache5
-rw-r--r--.be/version1
-rw-r--r--.gitignore2
-rw-r--r--LICENSE22
-rw-r--r--README.md57
-rwxr-xr-xadd-networked-repos.sh29
-rwxr-xr-xgit-req.sh23
-rwxr-xr-xgit-request-get.sh14
-rwxr-xr-xgit-svn-fix-authors.sh57
-rwxr-xr-xgit-svn-fix-tags.sh14
-rwxr-xr-xgit2redcrew.sh74
-rw-r--r--test_message_HEAD.mbx70
-rw-r--r--test_message_named.mbx72
21 files changed, 620 insertions, 0 deletions
diff --git a/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/4e8148a6-0022-46f7-90d9-851228e729a2/body b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/4e8148a6-0022-46f7-90d9-851228e729a2/body
new file mode 100644
index 0000000..8f26b0d
--- /dev/null
+++ b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/4e8148a6-0022-46f7-90d9-851228e729a2/body
@@ -0,0 +1,2 @@
+The attached patch leads to REPL being empty for the author
+(no author)
diff --git a/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/4e8148a6-0022-46f7-90d9-851228e729a2/values b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/4e8148a6-0022-46f7-90d9-851228e729a2/values
new file mode 100644
index 0000000..6b8308d
--- /dev/null
+++ b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/4e8148a6-0022-46f7-90d9-851228e729a2/values
@@ -0,0 +1,29 @@
+{
+
+
+
+
+
+
+ "Author": "Mat\u011bj Cepl <mcepl@redhat.com>",
+
+
+
+
+
+
+ "Content-type": "text/plain",
+
+
+
+
+
+
+ "Date": "Wed, 21 Aug 2013 12:16:38 +0000"
+
+
+
+
+
+
+}
diff --git a/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/55c16a2a-4877-4399-ae48-c5bb92010ef5/body b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/55c16a2a-4877-4399-ae48-c5bb92010ef5/body
new file mode 100644
index 0000000..9548251
--- /dev/null
+++ b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/55c16a2a-4877-4399-ae48-c5bb92010ef5/body
@@ -0,0 +1,35 @@
+diff --git a/git-svn-fix-authors b/git-svn-fix-authors
+index f78bfbe..458a91a 100755
+--- a/git-svn-fix-authors
++++ b/git-svn-fix-authors
+@@ -1,21 +1,25 @@
+ #!/bin/sh
+-set -eu
++set -eux
+
+ AUTHORS_FILE=$(git config svn.authorsfile) || {
+ echo "ERROR: set config.svn.authorsfile!"
+ exit 1
+ }
+-export AUTHORS_FILE=$(readlink -f $AUTHORS_FILE)
++AUTHORS_FILE=$(readlink -f $AUTHORS_FILE)
+
+ git filter-branch --env-filter '
+
+ function replacement() {
+- REPL=$(awk -F"[[:space:]]*=[[:space:]]*" "/$1/ {print \$2;}" $AUTHORS_FILE)
+- MAIL=$(echo $REPL|awk "{print \$NF}"|tr -d "<>" )
+- NAME=$(echo $REPL|awk "{print \$1, \$2}" )
++ echo -e "\n\$1 = $1"
++ REPL=$(awk -F"[[:space:]]*=[[:space:]]*" "/$1/ {print \$2}" $AUTHORS_FILE)
++ echo -e "\nREPL = $REPL"
++ MAIL=$(echo "$REPL"|awk "{print \$NF}"|tr -d "<>" )
++ NAME=$(echo "$REPL"|awk "{print gensub(/[[:space:]]*<[^[:space:]]*/,\"\",\"\")}" )
+ }
+
++
+ replacement "${GIT_AUTHOR_NAME}"
++echo -e "\nGIT_AUTHOR_NAME = $GIT_AUTHOR_NAME, NAME = $NAME, MAIL = $MAIL"
+
+ export GIT_AUTHOR_NAME="$NAME"
+ export GIT_AUTHOR_EMAIL="$MAIL"
diff --git a/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/55c16a2a-4877-4399-ae48-c5bb92010ef5/values b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/55c16a2a-4877-4399-ae48-c5bb92010ef5/values
new file mode 100644
index 0000000..5cc9896
--- /dev/null
+++ b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/55c16a2a-4877-4399-ae48-c5bb92010ef5/values
@@ -0,0 +1,29 @@
+{
+
+
+
+
+
+
+ "Author": "Mat\u011bj Cepl <mcepl@redhat.com>",
+
+
+
+
+
+
+ "Content-type": "text/x-diff",
+
+
+
+
+
+
+ "Date": "Wed, 21 Aug 2013 12:15:34 +0000"
+
+
+
+
+
+
+}
diff --git a/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/599abbc1-7996-44e5-8a53-d0c38a98e259/body b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/599abbc1-7996-44e5-8a53-d0c38a98e259/body
new file mode 100644
index 0000000..9faa9a1
--- /dev/null
+++ b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/599abbc1-7996-44e5-8a53-d0c38a98e259/body
@@ -0,0 +1,5 @@
+kasal: NAME .. $1, $2 -- a middle name neexistuje?
+mcepl: v daném repo ne, a já nevím, jak to zawkovat správně
+kasal: ze by gensub(/[[space:]]*<.*/,"","")
+ 4. parametr defaultuje na $0
+ A ta slova "export" tam jsou navic.
diff --git a/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/599abbc1-7996-44e5-8a53-d0c38a98e259/values b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/599abbc1-7996-44e5-8a53-d0c38a98e259/values
new file mode 100644
index 0000000..0a20dbb
--- /dev/null
+++ b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/599abbc1-7996-44e5-8a53-d0c38a98e259/values
@@ -0,0 +1,29 @@
+{
+
+
+
+
+
+
+ "Author": "Mat\u011bj Cepl <mcepl@redhat.com>",
+
+
+
+
+
+
+ "Content-type": "text/plain",
+
+
+
+
+
+
+ "Date": "Wed, 21 Aug 2013 11:43:13 +0000"
+
+
+
+
+
+
+}
diff --git a/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/values b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/values
new file mode 100644
index 0000000..0b26d7a
--- /dev/null
+++ b/.be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/values
@@ -0,0 +1,50 @@
+{
+
+
+
+
+
+
+ "creator": "Mat\u011bj Cepl <mcepl@redhat.com>",
+
+
+
+
+
+
+ "reporter": "Mat\u011bj Cepl <mcepl@redhat.com>",
+
+
+
+
+
+
+ "severity": "minor",
+
+
+
+
+
+
+ "status": "fixed",
+
+
+
+
+
+
+ "summary": "skasal's comments",
+
+
+
+
+
+
+ "time": "Wed, 21 Aug 2013 11:34:22 +0000"
+
+
+
+
+
+
+}
diff --git a/.be/e75fa81d-447c-41f5-8a36-888f899413df/settings b/.be/e75fa81d-447c-41f5-8a36-888f899413df/settings
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ b/.be/e75fa81d-447c-41f5-8a36-888f899413df/settings
@@ -0,0 +1 @@
+{}
diff --git a/.be/id-cache b/.be/id-cache
new file mode 100644
index 0000000..9615fbf
--- /dev/null
+++ b/.be/id-cache
@@ -0,0 +1,5 @@
+d1bb5924-b5a0-41f2-bb69-3d92c481038c .be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c
+55c16a2a-4877-4399-ae48-c5bb92010ef5 .be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/55c16a2a-4877-4399-ae48-c5bb92010ef5
+4e8148a6-0022-46f7-90d9-851228e729a2 .be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/4e8148a6-0022-46f7-90d9-851228e729a2
+599abbc1-7996-44e5-8a53-d0c38a98e259 .be/e75fa81d-447c-41f5-8a36-888f899413df/bugs/d1bb5924-b5a0-41f2-bb69-3d92c481038c/comments/599abbc1-7996-44e5-8a53-d0c38a98e259
+e75fa81d-447c-41f5-8a36-888f899413df .be/e75fa81d-447c-41f5-8a36-888f899413df
diff --git a/.be/version b/.be/version
new file mode 100644
index 0000000..38d39ae
--- /dev/null
+++ b/.be/version
@@ -0,0 +1 @@
+Bugs Everywhere Directory v1.5
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0b67157
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+git-request-pull
++.be/id-cache
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..df70f4a
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+Copyright © 2022 Matěj Cepl, mcepl at cepl dot eu
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the “Software”), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..859abb6
--- /dev/null
+++ b/README.md
@@ -0,0 +1,57 @@
+Hlupak (various git scripts)
+============================
+
+git-request-get:
+----------------
+
+This should be fulfilment of [my comment on the GitLab bug
+gl#gitlab-org/gitlab/-#14116](https://gitlab.com/gitlab-org/gitlab/-/issues/14116):
+
+> Well, the minimal solution would be a parser for the
+> git-request-pull(1), which would check every comment and if recognized
+> the comment as the pull request, it would add button for the owner of
+> the repo (e.g., [Create Pull Request]). After pressing that (so it is
+> constantly under the control of the owner repo), gitlab would setup
+> new remote (if doesn’t exist still), fetch it, and create a merge
+> request.
+
+git-req:
+--------
+
+Both Github and Gitlab allow command-line-only review of
+submitted contributions. However, the command for it is really
+long and complicated. Complicated enough for alias, so this is a
+small shell script for doing it.
+
+add-networked-repos:
+--------------------
+
+Goes through all networked repos to the current one on GitHub
+(recursively) and them as additional remotes.
+
+git-svn-fix-authors:
+--------------------
+
+git-svn(1) can work with the author file, but one gets to
+a bit of chicken-egg problem: for creation of the authors
+file is best to have output of git-shortlog(1). This script
+rewrites whole repo based on the authors file defined in
+`svn-remote.svn.authorsfile`.
+
+
+git-svn-fix-tags:
+-----------------
+
+git-svn(1) doesn’t really work with tags, it just creates
+branches called like tags. This script makes tags out of those
+branches.
+
+git2redcrew:
+------------
+
+Create copy of the current repo (or named repo) on private server.
+
+----
+
+All issues, questions, complaints, or (even better!) patches
+should be send via [email](mailto:mcepl@cepl.eu).
diff --git a/add-networked-repos.sh b/add-networked-repos.sh
new file mode 100755
index 0000000..fa7697f
--- /dev/null
+++ b/add-networked-repos.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+set -eux
+set -o noglob
+
+API_URL="https://api.github.com/repos"
+REPO_URL="https://github.com"
+
+if [ $# -ne 1 ] ; then
+ echo "The only parameter of the script is user/name of the repo"
+ exit 1
+fi
+
+# login=$(git config github.user)
+# passwd=$(git config github.password)
+
+get_forks() {
+ fname="${1}"
+ repo_url="$API_URL/$fname/forks"
+ repos="$(curl -s "$repo_url" | jq -r '.[]|.full_name')"
+ for full_name in $repos ; do
+ IFS='/' read -r -a names <<< "${full_name}"
+ l_user="$(echo "${names[0]}"|tr '[:upper:]' '[:lower:]')"
+ git remote add "${l_user}" "${REPO_URL}/${full_name}"
+ git fetch "${l_user}" || continue
+ get_forks "${full_name}"
+ done
+}
+
+get_forks "${1}"
diff --git a/git-req.sh b/git-req.sh
new file mode 100755
index 0000000..5c86116
--- /dev/null
+++ b/git-req.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -eux
+
+[ "$#" -lt 1 ] && exit 1
+
+req_no="$1"
+
+if ! git rev-parse --git-dir >/dev/null 2>&1 ; then
+ echo "Must be run from git repo checkout."
+ exit 2
+fi
+
+repo_url="$(git config --get remote.origin.url)"
+if [[ "${repo_url}" =~ gitlab ]] ; then
+ rem_ref_name="merge-requests"
+ loc_ref_name="mr"
+else
+ rem_ref_name="pull"
+ loc_ref_name="pr"
+fi
+
+git fetch origin refs/"$rem_ref_name"/"$req_no"/head:"$loc_ref_name"/"$req_no"
+git checkout "$loc_ref_name/$req_no"
diff --git a/git-request-get.sh b/git-request-get.sh
new file mode 100755
index 0000000..ad89ae3
--- /dev/null
+++ b/git-request-get.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -eu
+
+STR="$(cat)"
+
+URL="$(echo "$STR" | sed -n -e '/^are available in the Git repository at:/,+2 {
+s/[[:space:]]\+//
+s/\(=[[:digit:]]\{2\}\)\+$//
+/^\(http\|git\)/p
+}')"
+
+END="$(echo "$STR" | awk '/^for you to fetch changes up to / { print $NF }' | sed -e 's/[=:]*$//')"
+git fetch "$URL" "$END"
+git checkout -B _4review FETCH_HEAD
diff --git a/git-svn-fix-authors.sh b/git-svn-fix-authors.sh
new file mode 100755
index 0000000..7b46ef4
--- /dev/null
+++ b/git-svn-fix-authors.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+set -eu
+
+AUTHORS_FILE=$(git config svn.authorsfile) || \
+ AUTHORS_FILE=$(git config svn-remote.svn.authorsfile) || {
+ echo "ERROR: set config.svn.authorsfile!"
+ exit 128
+}
+export AUTHORS_FILE=$(readlink -f $AUTHORS_FILE)
+
+git filter-branch -f --tag-name-filter cat --env-filter '
+
+function replacement() {
+ REPL=$(awk -F"[[:space:]]*=[[:space:]]*" "/$1/ {print \$2}" $AUTHORS_FILE)
+ MAIL=$(echo "$REPL"|awk "{print \$NF}"|tr -d "<>" )
+ NAME=$(echo "$REPL"|awk "{print gensub(/[[:space:]]*<[^[:space:]]*/,\"\",\"\")}" )
+}
+
+replacement "${GIT_AUTHOR_NAME}"
+#if [ "x$NAME" == "x" ] ; then
+# echo -e "\nERROR: When changing ${GIT_COMMIT} we got empty reply."
+# echo -e "I do not know how to map ${GIT_AUTHOR_NAME}.\n"
+# set|grep ^GIT
+# exit 1
+#fi
+
+if [ "x$NAME" != "x" ] ; then
+export GIT_AUTHOR_NAME="$NAME"
+export GIT_AUTHOR_EMAIL="$MAIL"
+export GIT_COMMITTER_NAME="$NAME"
+export GIT_COMMITTER_EMAIL="$MAIL"
+fi
+' -- --tags
+
+git filter-branch -f --env-filter '
+
+function replacement() {
+ REPL=$(awk -F"[[:space:]]*=[[:space:]]*" "/$1/ {print \$2}" $AUTHORS_FILE)
+ MAIL=$(echo "$REPL"|awk "{print \$NF}"|tr -d "<>" )
+ NAME=$(echo "$REPL"|awk "{print gensub(/[[:space:]]*<[^[:space:]]*/,\"\",\"\")}" )
+}
+
+replacement "${GIT_AUTHOR_NAME}"
+#if [ "x$NAME" == "x" ] ; then
+# echo -e "\nERROR: When changing ${GIT_COMMIT} we got empty reply."
+# echo -e "I do not know how to map ${GIT_AUTHOR_NAME}.\n"
+# set|grep ^GIT
+# exit 1
+#fi
+
+if [ "x$NAME" != "x" ] ; then
+export GIT_AUTHOR_NAME="$NAME"
+export GIT_AUTHOR_EMAIL="$MAIL"
+export GIT_COMMITTER_NAME="$NAME"
+export GIT_COMMITTER_EMAIL="$MAIL"
+fi
+' -- --all
diff --git a/git-svn-fix-tags.sh b/git-svn-fix-tags.sh
new file mode 100755
index 0000000..3227620
--- /dev/null
+++ b/git-svn-fix-tags.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -x
+reponame=$(git config svn-remote.svn.url|tr '/' '\n'|tail -n1)
+
+#remotes/tags/release-0-7-8
+git for-each-ref refs/remotes/origin/tags | cut -d / -f 5- \
+ | while read oldref
+ do
+ ref=$(echo $oldref|sed -e "s/$reponame-*//")
+ echo "Converting branch $oldref to tag ${ref}."
+ git tag -a "$ref" -m"say farewell to SVN" \
+ "refs/remotes/origin/tags/$oldref" && \
+ git branch -r -d "tags/$oldref" >/dev/null 2>&1
+ done
diff --git a/git2redcrew.sh b/git2redcrew.sh
new file mode 100755
index 0000000..d4a8b60
--- /dev/null
+++ b/git2redcrew.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+set -ue
+
+SUBDIR=""
+PRIVATE=0
+
+REMHOST="redcrew"
+
+while getopts ":d:p" opt; do
+ case $opt in
+ d)
+ SUBDIR="/${OPTARG}"
+ ;;
+ p)
+ PRIVATE=1
+ ;;
+ \?)
+ echo "Invalid option: -$OPTARG"
+ exit 1
+ ;;
+ :)
+ echo "Option -$OPTARG requires an argument."
+ exit 1
+ ;;
+ esac
+done
+
+# Shift past the last option parsed by getopts
+shift $((OPTIND-1))
+
+if [ -e .git ] ; then
+ git gc --aggressive --prune=now
+ REPO="$(basename "$(git rev-parse --show-toplevel)")"
+ cd ..
+else
+ [ "$#" -gt 0 ] || exit 1
+ REPO="$1"
+ (cd "$REPO"
+ git gc --aggressive --prune=now
+ )
+fi
+
+GITDIR="$(readlink -f "${REPO}").git"
+git clone --bare "$REPO" "${GITDIR}"
+(cd "${GITDIR}"
+ # shellcheck disable=SC3045
+ read -r -e -p "Describe the repository:" DESC
+ echo "$DESC" >description
+ touch git-daemon-export-ok
+ git config --add gitweb.owner 'Matěj Cepl <mcepl@cepl.eu>'
+ git remote rm origin || /bin/true
+)
+
+if [ $PRIVATE -eq 1 ] ; then
+ TARGET="private_git${SUBDIR}"
+ URL_BASE="${REMHOST}:${TARGET}"
+else
+ TARGET="/srv/git${SUBDIR}"
+ URL_BASE="https://git.cepl.eu/cgit${SUBDIR}"
+fi
+
+rsync -avz "${GITDIR}" "${REMHOST}:${TARGET}/"
+rm -rf "${GITDIR}"
+cd "$REPO"
+git remote add myrepo "${URL_BASE}/${REPO}"
+if [ $PRIVATE -ne 1 ] ; then
+ git remote set-url --push myrepo "${REMHOST}:${TARGET}/${REPO}.git"
+fi
+# if git remote show gitlab >/dev/null 2>&1 ; then
+# git remote remove gitlab
+# fi
+git remote update
+git push --all -u myrepo
diff --git a/test_message_HEAD.mbx b/test_message_HEAD.mbx
new file mode 100644
index 0000000..965ed0d
--- /dev/null
+++ b/test_message_HEAD.mbx
@@ -0,0 +1,70 @@
+From ???@??? Thu Nov 16 15:45:08 2023
+Return-Path: <mcepl@cepl.eu>
+Delivered-To: <matej@ceplovi.cz>
+Received: from redcrew.org
+ by redcrew.org (Dovecot) with LMTP id hYNqKYIlVmWJcgAAsTppAA
+ for <matej@ceplovi.cz>; Thu, 16 Nov 2023 15:34:32 +0100
+Received: from localhost (unknown [185.22.237.37])
+ (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits))
+ (No client certificate requested)
+ by redcrew.org (Postfix) with ESMTPSA id B8DE4C6A
+ for <matej@ceplovi.cz>; Thu, 16 Nov 2023 15:34:32 +0100 (CET)
+Content-Type: multipart/signed;
+ boundary=c26872f3bd544c9ed77f3e24467434acca42fafd261b2709670ce08ff787;
+ micalg=pgp-sha1; protocol="application/pgp-signature"
+Date: Thu, 16 Nov 2023 15:34:32 +0100
+Message-Id: <CX0B77RJ7RB8.18BGVZJS64T53@cepl.eu>
+Subject: git request-pull output
+From: =?utf-8?q?Mat=C4=9Bj_Cepl?= <mcepl@cepl.eu>
+To: <matej@ceplovi.cz>
+Content-Transfer-Encoding: quoted-printable
+X-Mailer: aerc 0.16.0
+
+--c26872f3bd544c9ed77f3e24467434acca42fafd261b2709670ce08ff787
+Mime-Version: 1.0
+Content-Transfer-Encoding: quoted-printable
+Content-Type: text/plain; charset=UTF-8
+
+The following changes since commit e486999efac243e561a6604553ec93d20e10cdbb=
+:
+
+ Revert 957df43e (2023-11-03 22:57:18 +0100)
+
+are available in the Git repository at:
+
+ https://gitlab.com/mcepl/m2crypto.git=20
+
+for you to fetch changes up to 102cd4d5c1818ecb5926dd538962f8b42c43b022:
+
+ Raise proper exception in C (2023-11-03 23:42:49 +0100)
+
+----------------------------------------------------------------
+Mat=C4=9Bj Cepl (1):
+ Raise proper exception in C
+
+ src/M2Crypto/SSL/Connection.py | 15 ++++++++++-----
+ src/SWIG/_ssl.i | 45 ++++++++++++++++++++++++++++++++++++++=
++++----
+ 2 files changed, 51 insertions(+), 9 deletions(-)
+
+--=20
+http://matej.ceplovi.cz/blog/, @mcepl@floss.social
+GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8
+=20
+Anger is often what pain looks like when it shows itself in public.
+ -- Krista Tippett
+
+--c26872f3bd544c9ed77f3e24467434acca42fafd261b2709670ce08ff787
+Content-Type: application/pgp-signature; name="signature.asc"
+
+-----BEGIN PGP SIGNATURE-----
+
+iGwEABECACwWIQSJ70vGKIq/QxurJcPgn+8l2WSErAUCZVYoeA4cbWNlcGxAY2Vw
+bC5ldQAKCRDgn+8l2WSErAohAJ9/VsluRw5IdV7kUe9JMlLBsIfeAwCfYwJpq52m
+r8GM5J/XGCchNHU2+wU=
+=ivvg
+-----END PGP SIGNATURE-----
+
+--c26872f3bd544c9ed77f3e24467434acca42fafd261b2709670ce08ff787--
+
+
diff --git a/test_message_named.mbx b/test_message_named.mbx
new file mode 100644
index 0000000..2c3cae5
--- /dev/null
+++ b/test_message_named.mbx
@@ -0,0 +1,72 @@
+From ???@??? Sat Nov 18 18:40:11 2023
+Return-Path: <mcepl@cepl.eu>
+Delivered-To: <mcepl@cepl.eu>
+Received: from redcrew.org
+ by redcrew.org (Dovecot) with LMTP id /Zq9DUACWWWrMAAAsTppAA
+ for <mcepl@cepl.eu>; Sat, 18 Nov 2023 19:39:46 +0100
+Received: from localhost (unknown [185.22.237.37])
+ (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits))
+ (No client certificate requested)
+ by redcrew.org (Postfix) with ESMTPSA id 06E70C6A
+ for <mcepl@cepl.eu>; Sat, 18 Nov 2023 19:39:46 +0100 (CET)
+Content-Type: multipart/signed;
+ boundary=c9fe38422b0c7221e3dca5e2ee3bf892cf7e3061064579954466c4b3888f;
+ micalg=pgp-sha1; protocol="application/pgp-signature"
+Date: Sat, 18 Nov 2023 19:39:45 +0100
+Message-Id: <CX25O291DIXD.14IQ3URXX8KT1@cepl.eu>
+Subject: git request-pull product with named branch
+From: =?utf-8?q?Mat=C4=9Bj_Cepl?= <mcepl@cepl.eu>
+To: <mcepl@cepl.eu>
+X-Mailer: aerc 0.16.0
+
+--c9fe38422b0c7221e3dca5e2ee3bf892cf7e3061064579954466c4b3888f
+Mime-Version: 1.0
+Content-Transfer-Encoding: quoted-printable
+Content-Type: text/plain; charset=UTF-8
+
+The following changes since commit e486999efac243e561a6604553ec93d20e10cdbb=
+:
+
+ Revert 957df43e (2023-11-03 22:57:18 +0100)
+
+are available in the Git repository at:
+
+ https://gitlab.com/mcepl/m2crypto.git 270_len_SSL_Connection
+
+for you to fetch changes up to 102cd4d5c1818ecb5926dd538962f8b42c43b022:
+
+ Raise proper exception in C (2023-11-03 23:42:49 +0100)
+
+----------------------------------------------------------------
+Mat=C4=9Bj Cepl (1):
+ Raise proper exception in C
+
+ src/M2Crypto/SSL/Connection.py | 15 ++++++++++-----
+ src/SWIG/_ssl.i | 45 ++++++++++++++++++++++++++++++++++++++=
++++----
+ 2 files changed, 51 insertions(+), 9 deletions(-)
+
+--=20
+http://matej.ceplovi.cz/blog/, @mcepl@floss.social
+GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8
+=20
+<Overfiend> Don=E2=80=99t come crying to me about your =E2=80=9C30 minute
+compiles=E2=80=9D!! I have to build X uphill both ways! In the snow! With
+bare feet! And we didn=E2=80=99t have compilers! We had to translate the
+C code to mnemonics OURSELVES! And I was 18 before we even had
+assemblers!
+
+--c9fe38422b0c7221e3dca5e2ee3bf892cf7e3061064579954466c4b3888f
+Content-Type: application/pgp-signature; name="signature.asc"
+
+-----BEGIN PGP SIGNATURE-----
+
+iGwEABECACwWIQSJ70vGKIq/QxurJcPgn+8l2WSErAUCZVkE8g4cbWNlcGxAY2Vw
+bC5ldQAKCRDgn+8l2WSErCXWAJ4i9m0yi7MdFaml2jn4n2PjCGPrTwCfQ4z137m4
+Fi2aZrwKURbQSZV8Znc=
+=aemK
+-----END PGP SIGNATURE-----
+
+--c9fe38422b0c7221e3dca5e2ee3bf892cf7e3061064579954466c4b3888f--
+
+